- Notifications
You must be signed in to change notification settings - Fork28
Commit4c70336
committed
Fix handling of synchronous replication for stopping WAL senders
This fixes an oversight fromc6c3334 which forgot that if a subset ofWAL senders are stopping and in a sync state, other WAL senders couldstill be waiting for a WAL position to be synced while committing atransaction. However the subset of stopping senders would not releasewaiters, potentially breaking synchronous replication guarantees. Thiscommit makes sure that even WAL senders stopping are able to releasewaiters and are tracked properly.On 9.4, this can also trigger an assertion failure when setting forexample max_wal_senders to 1 where a WAL sender is not able to finditself as in synchronous state when the instance stops.Reported-by: Paul GuoAuthor: Paul Guo, Michael PaquierDiscussion:https://postgr.es/m/CAEET0ZEv8VFqT3C-cQm6byOB4r4VYWcef1J21dOX-gcVhCSpmA@mail.gmail.comBackpatch-through: 9.41 parent1a990b2 commit4c70336
1 file changed
+10
-6
lines changedLines changed: 10 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
425 | 425 |
| |
426 | 426 |
| |
427 | 427 |
| |
428 |
| - | |
| 428 | + | |
| 429 | + | |
429 | 430 |
| |
430 | 431 |
| |
431 |
| - | |
| 432 | + | |
| 433 | + | |
432 | 434 |
| |
433 | 435 |
| |
434 | 436 |
| |
| |||
730 | 732 |
| |
731 | 733 |
| |
732 | 734 |
| |
733 |
| - | |
734 |
| - | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
735 | 738 |
| |
736 | 739 |
| |
737 | 740 |
| |
| |||
809 | 812 |
| |
810 | 813 |
| |
811 | 814 |
| |
812 |
| - | |
813 |
| - | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
814 | 818 |
| |
815 | 819 |
| |
816 | 820 |
| |
|
0 commit comments
Comments
(0)