Re: memory leak in pgoutput

2024-11-20 Thread by Yang
> You should be more careful with the amount of tests you are doing > here. This fails while waiting for some changes to be streamed when > creating a subscription: > cd src/test/subscription/ && PROVE_TESTS=t/017_stream_ddl.pl make check I apologize for the obvious error in the previous patch. I

Re: memory leak in pgoutput

2024-11-18 Thread by Yang
> By the way, if possible, could you send an updated version of the > patch to show what you have in mind? Yeah, here is the new patch: I have verifed that this patch works for REL_[15-17]_STABLE and master. The memory consumption of "logical replication cache context" remains consistently at 112 

Re: memory leak in pgoutput

2024-11-17 Thread by Yang
> Here, after freeing the tupledesc, the ExecDropSingleTupleTableSlot will still > access the freed tupledesc->tdrefcount which is an illegal memory access. Yes, I overlooked that. > I think we can do something like below instead: > > + TupleDesc desc = > entry->old_s

memory leak in pgoutput

2024-11-16 Thread by Yang
Hello, I recently noticed a unusually large memory consumption in pgoutput where "RelationSyncCache" is maintaining approximately 3 GB of memory while handling 15,000 tables. Upon investigating the cause, I found that "tts_tupleDescriptor" in both "old_slot" and "new_slot" wouldn't be freed befor