git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: fc8cb94) | patch
Make pg_promote() detect postmaster death while waiting for promotion to end.
Fri, 6 Sep 2019 05:27:25 +0000 (14:27 +0900)
Fri, 6 Sep 2019 05:27:25 +0000 (14:27 +0900)
commit 946647f845d0b0762656a8e07055f501c4b29688
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
src/backend/access/transam/xlogfuncs.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /