pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fall back to serializing when parallel apply runs out of DSM seg 5+ messages / 1 participants [nested] [flat]
* pgsql: Fall back to serializing when parallel apply runs out of DSM seg @ 2026-11-18 18:30 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Masahiko Sawada @ 2026-11-18 18:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fall back to serializing when parallel apply runs out of DSM segments. Commit 216a784829c made the leader apply worker serialize a streamed transaction to a file if it fails to set up the shared memory for a parallel apply worker. However, it called dsm_create() without DSM_CREATE_NULL_IF_MAXSEGMENTS, so running out of DSM segments raised an ERROR instead. The leader apply worker then exited and failed again at the same STREAM START after restarting, so replication made no progress until segments were freed. Fix by passing DSM_CREATE_NULL_IF_MAXSEGMENTS, as parallel query does. Backpatch to v16, where parallel apply was introduced. Author: Baji Shaik <baji.pgdev@gmail.com> Reviewed-by: Zhijie Hou <houzhijie22@gmail.com> Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CA+fm-RMyb6EoMuk+a4_hZou9cdTHfB6mj1UV-7yb_YuTWLug1g@mail.gmail.com Backpatch-through: 16 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c790e38b4a26f8546a10f3a4fdb79cf090f70632 Modified Files -------------- src/backend/replication/logical/applyparallelworker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fall back to serializing when parallel apply runs out of DSM seg @ 2026-11-18 18:30 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Masahiko Sawada @ 2026-11-18 18:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fall back to serializing when parallel apply runs out of DSM segments. Commit 216a784829c made the leader apply worker serialize a streamed transaction to a file if it fails to set up the shared memory for a parallel apply worker. However, it called dsm_create() without DSM_CREATE_NULL_IF_MAXSEGMENTS, so running out of DSM segments raised an ERROR instead. The leader apply worker then exited and failed again at the same STREAM START after restarting, so replication made no progress until segments were freed. Fix by passing DSM_CREATE_NULL_IF_MAXSEGMENTS, as parallel query does. Backpatch to v16, where parallel apply was introduced. Author: Baji Shaik <baji.pgdev@gmail.com> Reviewed-by: Zhijie Hou <houzhijie22@gmail.com> Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CA+fm-RMyb6EoMuk+a4_hZou9cdTHfB6mj1UV-7yb_YuTWLug1g@mail.gmail.com Backpatch-through: 16 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f22cb79d05b0a9dfc9b4065a8f8f08c4c716fd2d Modified Files -------------- src/backend/replication/logical/applyparallelworker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fall back to serializing when parallel apply runs out of DSM seg @ 2026-11-18 18:30 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Masahiko Sawada @ 2026-11-18 18:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fall back to serializing when parallel apply runs out of DSM segments. Commit 216a784829c made the leader apply worker serialize a streamed transaction to a file if it fails to set up the shared memory for a parallel apply worker. However, it called dsm_create() without DSM_CREATE_NULL_IF_MAXSEGMENTS, so running out of DSM segments raised an ERROR instead. The leader apply worker then exited and failed again at the same STREAM START after restarting, so replication made no progress until segments were freed. Fix by passing DSM_CREATE_NULL_IF_MAXSEGMENTS, as parallel query does. Backpatch to v16, where parallel apply was introduced. Author: Baji Shaik <baji.pgdev@gmail.com> Reviewed-by: Zhijie Hou <houzhijie22@gmail.com> Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CA+fm-RMyb6EoMuk+a4_hZou9cdTHfB6mj1UV-7yb_YuTWLug1g@mail.gmail.com Backpatch-through: 16 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3b367aaa57a35d8561972cb777ca2227c1547c63 Modified Files -------------- src/backend/replication/logical/applyparallelworker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fall back to serializing when parallel apply runs out of DSM seg @ 2026-11-18 18:30 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Masahiko Sawada @ 2026-11-18 18:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fall back to serializing when parallel apply runs out of DSM segments. Commit 216a784829c made the leader apply worker serialize a streamed transaction to a file if it fails to set up the shared memory for a parallel apply worker. However, it called dsm_create() without DSM_CREATE_NULL_IF_MAXSEGMENTS, so running out of DSM segments raised an ERROR instead. The leader apply worker then exited and failed again at the same STREAM START after restarting, so replication made no progress until segments were freed. Fix by passing DSM_CREATE_NULL_IF_MAXSEGMENTS, as parallel query does. Backpatch to v16, where parallel apply was introduced. Author: Baji Shaik <baji.pgdev@gmail.com> Reviewed-by: Zhijie Hou <houzhijie22@gmail.com> Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CA+fm-RMyb6EoMuk+a4_hZou9cdTHfB6mj1UV-7yb_YuTWLug1g@mail.gmail.com Backpatch-through: 16 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/083f30f4763c60013b6f90deb3d4ee57bbf03db4 Modified Files -------------- src/backend/replication/logical/applyparallelworker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fall back to serializing when parallel apply runs out of DSM seg @ 2026-11-18 18:30 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Masahiko Sawada @ 2026-11-18 18:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fall back to serializing when parallel apply runs out of DSM segments. Commit 216a784829c made the leader apply worker serialize a streamed transaction to a file if it fails to set up the shared memory for a parallel apply worker. However, it called dsm_create() without DSM_CREATE_NULL_IF_MAXSEGMENTS, so running out of DSM segments raised an ERROR instead. The leader apply worker then exited and failed again at the same STREAM START after restarting, so replication made no progress until segments were freed. Fix by passing DSM_CREATE_NULL_IF_MAXSEGMENTS, as parallel query does. Backpatch to v16, where parallel apply was introduced. Author: Baji Shaik <baji.pgdev@gmail.com> Reviewed-by: Zhijie Hou <houzhijie22@gmail.com> Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CA+fm-RMyb6EoMuk+a4_hZou9cdTHfB6mj1UV-7yb_YuTWLug1g@mail.gmail.com Backpatch-through: 16 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5aafc5cb6ee2747cf76fa60804ca248c833039f4 Modified Files -------------- src/backend/replication/logical/applyparallelworker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2026-11-18 18:30 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-18 18:30 pgsql: Fall back to serializing when parallel apply runs out of DSM seg Masahiko Sawada <msawada@postgresql.org> 2026-11-18 18:30 pgsql: Fall back to serializing when parallel apply runs out of DSM seg Masahiko Sawada <msawada@postgresql.org> 2026-11-18 18:30 pgsql: Fall back to serializing when parallel apply runs out of DSM seg Masahiko Sawada <msawada@postgresql.org> 2026-11-18 18:30 pgsql: Fall back to serializing when parallel apply runs out of DSM seg Masahiko Sawada <msawada@postgresql.org> 2026-11-18 18:30 pgsql: Fall back to serializing when parallel apply runs out of DSM seg Masahiko Sawada <msawada@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