forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7aa815a
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 parent4c3e750 commit7aa815a
1 file changed
+13
-4
lines changedLines changed: 13 additions & 4 deletions
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)