pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix memory leak in SnapBuildSerialize.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix memory leak in SnapBuildSerialize.
@ 2021-01-13 04:17 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Kapila @ 2021-01-13 04:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ee1b38f65948cb09ecf3c39b58bd88aabc950e7c

Modified Files
--------------
src/backend/replication/logical/snapbuild.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix memory leak in SnapBuildSerialize.
@ 2021-01-13 04:17 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Kapila @ 2021-01-13 04:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0685c5c1b9225352bbaf4fe81c550f09508379ce

Modified Files
--------------
src/backend/replication/logical/snapbuild.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix memory leak in SnapBuildSerialize.
@ 2021-01-13 04:17 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Kapila @ 2021-01-13 04:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0b2ae3c928b2926fafa1c423b07b949a4c3bc402

Modified Files
--------------
src/backend/replication/logical/snapbuild.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix memory leak in SnapBuildSerialize.
@ 2021-01-13 04:17 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Kapila @ 2021-01-13 04:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7adc408f4b64db1c9244dc48d40b87ba8be9df9a

Modified Files
--------------
src/backend/replication/logical/snapbuild.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix memory leak in SnapBuildSerialize.
@ 2021-01-13 04:17 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Kapila @ 2021-01-13 04:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/636b6f99c215217b7e112dc2a97ff1a12f0bd21e

Modified Files
--------------
src/backend/replication/logical/snapbuild.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix memory leak in SnapBuildSerialize.
@ 2021-01-13 04:17 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Kapila @ 2021-01-13 04:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f2b268ee0626286d15a1eaa78fe1704811d51cd4

Modified Files
--------------
src/backend/replication/logical/snapbuild.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix memory leak in SnapBuildSerialize.
@ 2021-01-13 04:17 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Kapila @ 2021-01-13 04:17 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4bccceaa9179bffbe3469909e28ce4ded34f0a09

Modified Files
--------------
src/backend/replication/logical/snapbuild.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2021-01-13 04:17 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 04:17 pgsql: Fix memory leak in SnapBuildSerialize. Amit Kapila <akapila@postgresql.org>
2021-01-13 04:17 pgsql: Fix memory leak in SnapBuildSerialize. Amit Kapila <akapila@postgresql.org>
2021-01-13 04:17 pgsql: Fix memory leak in SnapBuildSerialize. Amit Kapila <akapila@postgresql.org>
2021-01-13 04:17 pgsql: Fix memory leak in SnapBuildSerialize. Amit Kapila <akapila@postgresql.org>
2021-01-13 04:17 pgsql: Fix memory leak in SnapBuildSerialize. Amit Kapila <akapila@postgresql.org>
2021-01-13 04:17 pgsql: Fix memory leak in SnapBuildSerialize. Amit Kapila <akapila@postgresql.org>
2021-01-13 04:17 pgsql: Fix memory leak in SnapBuildSerialize. Amit Kapila <akapila@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox