postgresql/src/backend/replication/logical
Amit Kapila f2b268ee06 Fix memory leak in SnapBuildSerialize.
The memory for the snapshot was leaked while serializing it to disk during
logical decoding. This memory will be freed only once walsender stops
streaming the changes. This can lead to a huge memory increase when master
logs Standby Snapshot too frequently say when the user is trying to create
many replication slots.

Reported-by: funnyxj.fxj@alibaba-inc.com
Diagnosed-by: funnyxj.fxj@alibaba-inc.com
Author: Amit Kapila
Backpatch-through: 9.5
Discussion: https://postgr.es/m/033ab54c-6393-42ee-8ec9-2b399b5d8cde.funnyxj.fxj@alibaba-inc.com
2021-01-13 09:12:59 +05:30
..
decode.c Back-patch log_newpage_range(). 2020-03-21 09:38:35 -07:00
logical.c Fix instance of elog() called while holding a spinlock 2020-06-04 10:18:17 +09:00
logicalfuncs.c Revert timeline following in replication slots 2016-05-04 17:32:22 -03:00
Makefile Generic Messages for Logical Decoding 2016-04-06 10:05:41 +01:00
message.c pgindent run for 9.6 2016-06-09 18:02:36 -04:00
origin.c Fix bogus initialization of replication origin shared memory state. 2020-05-15 19:05:40 -04:00
reorderbuffer.c C comment: correct commented bytes of max_cached_tuplebufs 2020-03-14 17:36:54 -04:00
snapbuild.c Fix memory leak in SnapBuildSerialize. 2021-01-13 09:12:59 +05:30