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

Amit Kapila
pg_createsubscriber: Fix an unpredictable recovery wait time.
The problem is that the tool is using the LSN returned bypg_create_logical_replication_slot() as recovery_target_lsn. This LSN isahead of the current WAL position and the recovery waits until thepublisher writes a WAL record to reach the target and ends the recovery.On idle systems, this wait time is unpredictable and could lead to failurein promoting the subscriber. To avoid that, insert a harmless WAL record.Reported-by: Alexander Lakhin and Tom LaneDiagnosed-by: Hayato KurodaAuthor: Euler TaveiraReviewed-by: Hayato Kuroda, Amit KapilaBackpatch-through: 17Discussion:https://postgr.es/m/2377319.1719766794%40sss.pgh.pa.usDiscussion:https://postgr.es/m/CA+TgmoYcY+Wb67NAwaHT7MvxCSeV86oSc+va9hHKaasE42ukyw@mail.gmail.com1 parentc19615f commit03b08c8
1 file changed
+22
-0
lines changedLines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
778 | 778 |
| |
779 | 779 |
| |
780 | 780 |
| |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
781 | 803 |
| |
782 | 804 |
| |
783 | 805 |
| |
|
0 commit comments
Comments
(0)