Skip to content

Memory leak with psycopg-c (but not pure python) #647

@bufke

Description

@bufke

I found a memory leak when using psycopg-c (not present in pure python version) when using with Django and Celery. I reported the issue to Django here but it is not clear exactly which project is at fault.

Here is a reproduction repo.

Django/Celery seems to call hstore.register_hstore(ti, connection.connection) on every celery task instead of just once. That might be a bug in one of those projects - but I would think psycopg should not memory leak when doing such. And the problem goes away with psycopg (sans c).

I will continue to try to create a more minimal reproduction set up. Please let me know if you have ideas to things to try out to help debug/fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions