pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Make pg_promote() detect postmaster death while waiting for prom 2+ messages / 1 participants [nested] [flat]
* pgsql: Make pg_promote() detect postmaster death while waiting for prom @ 2019-09-06 05:29 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2019-09-06 05:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Make pg_promote() detect postmaster death while waiting for promotion to end. Previously even if postmaster died and WaitLatch() woke up with that event while pg_promote() was waiting for the standby promotion to finish, pg_promote() did nothing special and kept waiting until timeout occurred. This could cause a busy loop. This patch make pg_promote() return false immediately when postmaster dies, to avoid such a busy loop. Back-patch to v12 where pg_promote() was added. Author: Fujii Masao Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CAHGQGwEs9ROgSp+QF+YdDU+xP8W=CY1k-_Ov-d_Z3JY+to3eXA@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/946647f845d0b0762656a8e07055f501c4b29688 Modified Files -------------- src/backend/access/transam/xlogfuncs.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Make pg_promote() detect postmaster death while waiting for prom @ 2019-09-06 05:30 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2019-09-06 05:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Make pg_promote() detect postmaster death while waiting for promotion to end. Previously even if postmaster died and WaitLatch() woke up with that event while pg_promote() was waiting for the standby promotion to finish, pg_promote() did nothing special and kept waiting until timeout occurred. This could cause a busy loop. This patch make pg_promote() return false immediately when postmaster dies, to avoid such a busy loop. Back-patch to v12 where pg_promote() was added. Author: Fujii Masao Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CAHGQGwEs9ROgSp+QF+YdDU+xP8W=CY1k-_Ov-d_Z3JY+to3eXA@mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7aa815a7aadd0dcc0515dfc3a88677deb0ca11ff Modified Files -------------- src/backend/access/transam/xlogfuncs.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-09-06 05:30 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-09-06 05:29 pgsql: Make pg_promote() detect postmaster death while waiting for prom Fujii Masao <fujii@postgresql.org> 2019-09-06 05:30 pgsql: Make pg_promote() detect postmaster death while waiting for prom Fujii Masao <fujii@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