forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit276115f
Tweak pg_promote() to report failures on kill() or postmaster failures
Since its introduction in1007465, pg_promote() has been returninga false status in three cases:- SIGUSR1 not sent to the postmaster process.- Postmaster death during standby promotion.- Standby not promoted within the specified wait time.An application calling this function will have a hard time understandingwhat a false state returned actually means.Per discussion, this switches the two first states to fail rather thanreturn a "false" status, making the second case more consistent with theexisting CHECK_FOR_INTERRUPTS in the wait loop. False is only returnedwhen the promotion is not completed within the specified time (60s bydefault).Author: Ashutosh SharmaReviewed-by: Fujii Masao, Laurenz Albe, Michael PaquierDiscussion:https://postgr.es/m/CAE9k0P=QTrwptL0t4J0fuBRDDjgsT-0PVKd-ikd96i1hyL7Bcg@mail.gmail.com1 parentdb9a475 commit276115f
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
714 | | - | |
715 | | - | |
716 | 714 | | |
717 | | - | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
748 | 751 | | |
749 | 752 | | |
750 | 753 | | |
| |||
0 commit comments
Comments
(0)