forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8340eba
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 parent63d8350 commit8340eba
1 file changed
+7
-4
lines changedLines changed: 7 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
397 | 397 |
| |
398 | 398 |
| |
399 | 399 |
| |
400 |
| - | |
| 400 | + | |
| 401 | + | |
401 | 402 |
| |
402 | 403 |
| |
403 |
| - | |
| 404 | + | |
| 405 | + | |
404 | 406 |
| |
405 | 407 |
| |
406 | 408 |
| |
| |||
585 | 587 |
| |
586 | 588 |
| |
587 | 589 |
| |
588 |
| - | |
589 |
| - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
590 | 593 |
| |
591 | 594 |
| |
592 | 595 |
| |
|
0 commit comments
Comments
(0)