pgsync: Unused Function causing Memory Leak?
PGSync version: master
Postgres version: 13.7
Elasticsearch version: 8.3.2
Redis version: 7
Python version: 3.8.10
Problem Description:
We have a memory leak we’re trying to track down.
Can I ask what the utility of this function is: https://github.com/toluaina/pgsync/blob/1489a24815454800a230355fafadf77c9ac7442f/pgsync/base.py#L402
It seems to only issue a select statement and return the results, but the callers doesn’t use the results: https://github.com/toluaina/pgsync/blob/1489a24815454800a230355fafadf77c9ac7442f/pgsync/sync.py#L441
If I just replace the body of this function with return 1, I don’t get any errors and it appears to at least improve the memory leak.
Potentially related? https://github.com/sqlalchemy/sqlalchemy/issues/7875
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 23 (12 by maintainers)
Commits related to this issue
- address memory issues in Tree build #316 — committed to toluaina/pgsync by toluaina 2 years ago
- address memory issues in Tree build #316 — committed to Zurnaz/pgsync by toluaina 2 years ago
I found the cause of this. The Node class is created multiple times and needs to implement a singleton pattern. I’ll have a fix for this soon