forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb8bb8db
committed
More synchronous replication tweaks.
SyncRepRequested() must check not only the value of thesynchronous_replication GUC but also whether max_wal_senders > 0.Otherwise, we might end up waiting for sync rep even when there's nopossibility of a standby ever managing to connect. There are someexisting cross-checks to prevent this, but they're not quite sufficient:the user can start the server with max_wal_senders=0,synchronous_standby_names='', and synchronous_replication=off and thensubsequent make synchronous_standby_names not empty using pg_ctl reload,and then SET synchronous_standby=on, leading to an indefinite hang.Along the way, rename the global variable for the synchronous_replicationGUC to match the name of the GUC itself, for clarity.Report by Fujii Masao, though I didn't use his patch.1 parente397d2e commitb8bb8db
3 files changed
+5
-4
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
65 |
| - | |
| 65 | + | |
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
759 | 759 |
| |
760 | 760 |
| |
761 | 761 |
| |
762 |
| - | |
| 762 | + | |
763 | 763 |
| |
764 | 764 |
| |
765 | 765 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + | |
| 23 | + | |
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
| |||
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
31 |
| - | |
| 32 | + | |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
|
0 commit comments
Comments
(0)