- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitfd09c13
committed
Restrict copying of invalidated replication slots.
Previously, invalidated logical and physical replication slots couldbe copied using the pg_copy_logical_replication_slot andpg_copy_physical_replication_slot functions. Replication slots thatwere invalidated for reasons other than WAL removal retained theirrestart_lsn. This meant that a new slot copied from an invalidatedslot could have a restart_lsn pointing to a WAL segment that mighthave already been removed.This commit restricts the copying of invalidated replication slots.Backpatch to v16, where slots could retain their restart_lsn wheninvalidated for reasons other than WAL removal.For v15 and earlier, this check is not required since slots can onlybe invalidated due to WAL removal, and existing checks already handlethis issue.Author: Shlok Kyal <shlok.kyal.oss@gmail.com>Reviewed-by: vignesh C <vignesh21@gmail.com>Reviewed-by: Zhijie Hou <houzj.fnst@fujitsu.com>Reviewed-by: Peter Smith <smithpb2250@gmail.com>Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>Discussion:https://postgr.es/m/CANhcyEU65aH0VYnLiu%3DOhNNxhnhNhwcXBeT-jvRe1OiJTo_Ayg%40mail.gmail.comBackpatch-through: 161 parentf104192 commitfd09c13
File tree
3 files changed
+34
-2
lines changed- doc/src/sgml
- src
- backend/replication
- test/recovery/t
3 files changed
+34
-2
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29598 | 29598 |
| |
29599 | 29599 |
| |
29600 | 29600 |
| |
29601 |
| - | |
| 29601 | + | |
| 29602 | + | |
29602 | 29603 |
| |
29603 | 29604 |
| |
29604 | 29605 |
| |
| |||
29623 | 29624 |
| |
29624 | 29625 |
| |
29625 | 29626 |
| |
29626 |
| - | |
| 29627 | + | |
| 29628 | + | |
29627 | 29629 |
| |
29628 | 29630 |
| |
29629 | 29631 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
684 | 684 |
| |
685 | 685 |
| |
686 | 686 |
| |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
687 | 694 |
| |
688 | 695 |
| |
689 | 696 |
| |
| |||
785 | 792 |
| |
786 | 793 |
| |
787 | 794 |
| |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
788 | 809 |
| |
789 | 810 |
| |
790 | 811 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
591 | 591 |
| |
592 | 592 |
| |
593 | 593 |
| |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
594 | 603 |
| |
595 | 604 |
| |
596 | 605 |
| |
|
0 commit comments
Comments
(0)