forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8709dcc

Amit Kapila
Fix the race condition in ReplicationSlotAcquire().
After commitf41d846, a process could acquire and use a replicationslot that had just been invalidated, leading to failures while accessingWAL.To ensure that we don't accidentally start using invalid slots, we mustperform the invalidation check after acquiring the slot or under thespinlock where we associate the slot with a particular process. We choosethe earlier method to keep the code simple.Reported-by: Hou Zhijie <houzj.fnst@fujitsu.com>Author: Nisha Moond <nisha.moond412@gmail.com>Reviewed-by: Hou Zhijie <houzj.fnst@fujitsu.com>Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>Discussion:https://postgr.es/m/CABdArM7J-LbGoMPGUPiFiLOyB_TZ5+YaZb=HMES0mQqzVTn8Gg@mail.gmail.com1 parent845511a commit8709dcc
1 file changed
+16
-16
lines changedLines changed: 16 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
580 | 580 |
| |
581 | 581 |
| |
582 | 582 |
| |
583 |
| - | |
584 |
| - | |
585 |
| - | |
586 |
| - | |
587 |
| - | |
588 |
| - | |
589 |
| - | |
590 |
| - | |
591 |
| - | |
592 |
| - | |
593 |
| - | |
594 |
| - | |
595 |
| - | |
596 | 583 |
| |
597 | 584 |
| |
598 | 585 |
| |
| |||
650 | 637 |
| |
651 | 638 |
| |
652 | 639 |
| |
653 |
| - | |
654 |
| - | |
655 |
| - | |
656 | 640 |
| |
657 | 641 |
| |
658 | 642 |
| |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
659 | 659 |
| |
660 | 660 |
| |
661 | 661 |
| |
|
0 commit comments
Comments
(0)