forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit946647f
committed
Make pg_promote() detect postmaster death while waiting for promotion to end.
Previously even if postmaster died and WaitLatch() woke up with that eventwhile 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 postmasterdies, to avoid such a busy loop.Back-patch to v12 where pg_promote() was added.Author: Fujii MasaoReviewed-by: Michael PaquierDiscussion:https://postgr.es/m/CAHGQGwEs9ROgSp+QF+YdDU+xP8W=CY1k-_Ov-d_Z3JY+to3eXA@mail.gmail.com1 parentfc8cb94 commit946647f
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
| 762 | + | |
| 763 | + | |
762 | 764 | | |
763 | 765 | | |
764 | 766 | | |
765 | 767 | | |
766 | 768 | | |
767 | 769 | | |
768 | 770 | | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
773 | 782 | | |
774 | 783 | | |
775 | 784 | | |
| |||
0 commit comments
Comments
(0)