pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix memory leak in pgoutput for the WAL sender 4+ messages / 1 participants [nested] [flat]
* pgsql: Fix memory leak in pgoutput for the WAL sender @ 2024-11-21 06:14 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2024-11-21 06:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix memory leak in pgoutput for the WAL sender RelationSyncCache, the hash table in charge of tracking the relation schemas sent through pgoutput, was forgetting to free the TupleDesc associated to the two slots used to store the new and old tuples, causing some memory to be leaked each time a relation is invalidated when the slots of an existing relation entry are cleaned up. This is rather hard to notice as the bloat is pretty minimal, but a long-running WAL sender would be in trouble over time depending on the workload. sysbench has proved to be pretty good at showing the problem, coupled with some memory monitoring of the WAL sender. Issue introduced in 52e4f0cd472d, that has added row filters for tables logically replicated. Author: Boyu Yang Reviewed-by: Michael Paquier, Hou Zhijie Discussion: https://postgr.es/m/DM3PR84MB3442E14B340E553313B5C816E3252@DM3PR84MB3442.NAMPRD84.PROD.OUTLOOK.COM Backpatch-through: 15 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ea792bfd93ab8ad4ef4e3d1a741b8595db143677 Modified Files -------------- src/backend/replication/pgoutput/pgoutput.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix memory leak in pgoutput for the WAL sender @ 2024-11-21 06:14 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2024-11-21 06:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix memory leak in pgoutput for the WAL sender RelationSyncCache, the hash table in charge of tracking the relation schemas sent through pgoutput, was forgetting to free the TupleDesc associated to the two slots used to store the new and old tuples, causing some memory to be leaked each time a relation is invalidated when the slots of an existing relation entry are cleaned up. This is rather hard to notice as the bloat is pretty minimal, but a long-running WAL sender would be in trouble over time depending on the workload. sysbench has proved to be pretty good at showing the problem, coupled with some memory monitoring of the WAL sender. Issue introduced in 52e4f0cd472d, that has added row filters for tables logically replicated. Author: Boyu Yang Reviewed-by: Michael Paquier, Hou Zhijie Discussion: https://postgr.es/m/DM3PR84MB3442E14B340E553313B5C816E3252@DM3PR84MB3442.NAMPRD84.PROD.OUTLOOK.COM Backpatch-through: 15 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/afe9b0d9fee1b4b02593ee4563653198771558cf Modified Files -------------- src/backend/replication/pgoutput/pgoutput.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix memory leak in pgoutput for the WAL sender @ 2024-11-21 06:14 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2024-11-21 06:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix memory leak in pgoutput for the WAL sender RelationSyncCache, the hash table in charge of tracking the relation schemas sent through pgoutput, was forgetting to free the TupleDesc associated to the two slots used to store the new and old tuples, causing some memory to be leaked each time a relation is invalidated when the slots of an existing relation entry are cleaned up. This is rather hard to notice as the bloat is pretty minimal, but a long-running WAL sender would be in trouble over time depending on the workload. sysbench has proved to be pretty good at showing the problem, coupled with some memory monitoring of the WAL sender. Issue introduced in 52e4f0cd472d, that has added row filters for tables logically replicated. Author: Boyu Yang Reviewed-by: Michael Paquier, Hou Zhijie Discussion: https://postgr.es/m/DM3PR84MB3442E14B340E553313B5C816E3252@DM3PR84MB3442.NAMPRD84.PROD.OUTLOOK.COM Backpatch-through: 15 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e749eaf46e9b05d25592d9c83bde7fb026e9c6eb Modified Files -------------- src/backend/replication/pgoutput/pgoutput.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix memory leak in pgoutput for the WAL sender @ 2024-11-21 06:14 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2024-11-21 06:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix memory leak in pgoutput for the WAL sender RelationSyncCache, the hash table in charge of tracking the relation schemas sent through pgoutput, was forgetting to free the TupleDesc associated to the two slots used to store the new and old tuples, causing some memory to be leaked each time a relation is invalidated when the slots of an existing relation entry are cleaned up. This is rather hard to notice as the bloat is pretty minimal, but a long-running WAL sender would be in trouble over time depending on the workload. sysbench has proved to be pretty good at showing the problem, coupled with some memory monitoring of the WAL sender. Issue introduced in 52e4f0cd472d, that has added row filters for tables logically replicated. Author: Boyu Yang Reviewed-by: Michael Paquier, Hou Zhijie Discussion: https://postgr.es/m/DM3PR84MB3442E14B340E553313B5C816E3252@DM3PR84MB3442.NAMPRD84.PROD.OUTLOOK.COM Backpatch-through: 15 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6fc30c24cb7f648a4997c7508333bbe7f5a7de9c Modified Files -------------- src/backend/replication/pgoutput/pgoutput.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2024-11-21 06:14 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-11-21 06:14 pgsql: Fix memory leak in pgoutput for the WAL sender Michael Paquier <michael@paquier.xyz> 2024-11-21 06:14 pgsql: Fix memory leak in pgoutput for the WAL sender Michael Paquier <michael@paquier.xyz> 2024-11-21 06:14 pgsql: Fix memory leak in pgoutput for the WAL sender Michael Paquier <michael@paquier.xyz> 2024-11-21 06:14 pgsql: Fix memory leak in pgoutput for the WAL sender Michael Paquier <michael@paquier.xyz>
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