Commit 9a7b7ad
committed
Make logical WAL sender report streaming state appropriately
WAL senders sending logically-decoded data fail to properly report in
"streaming" state when starting up, hence as long as one extra record is
not replayed, such WAL senders would remain in a "catchup" state, which
is inconsistent with the physical cousin.
This can be easily reproduced by for example using pg_recvlogical and
restarting the upstream server. The TAP tests have been slightly
modified to detect the failure and strengthened so as future tests also
make sure that a node is in streaming state when waiting for its
catchup.
Backpatch down to 9.4 where this code has been introduced.
Reported-by: Sawada Masahiko
Author: Simon Riggs, Sawada Masahiko
Reviewed-by: Petr Jelinek, Michael Paquier, Vaishnavi Prabakaran
Discussion: https://postgr.es/m/CAD21AoB2ZbCCqOx=bgKMcLrAvs1V0ZMqzs7wBTuDySezTGtMZA@mail.gmail.com1 parent 39a9651 commit 9a7b7ad
File tree
3 files changed
+23
-7
lines changed- src
- backend/replication
- test
- perl
- subscription/t
3 files changed
+23
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2169 | 2169 | | |
2170 | 2170 | | |
2171 | 2171 | | |
2172 | | - | |
| 2172 | + | |
2173 | 2173 | | |
2174 | 2174 | | |
2175 | 2175 | | |
| |||
2758 | 2758 | | |
2759 | 2759 | | |
2760 | 2760 | | |
2761 | | - | |
2762 | | - | |
2763 | | - | |
2764 | | - | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
2765 | 2765 | | |
2766 | 2766 | | |
2767 | 2767 | | |
| |||
2774 | 2774 | | |
2775 | 2775 | | |
2776 | 2776 | | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
2777 | 2780 | | |
2778 | 2781 | | |
2779 | 2782 | | |
| |||
2782 | 2785 | | |
2783 | 2786 | | |
2784 | 2787 | | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
2785 | 2795 | | |
2786 | 2796 | | |
2787 | 2797 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1535 | 1535 | | |
1536 | 1536 | | |
1537 | 1537 | | |
1538 | | - | |
| 1538 | + | |
| 1539 | + | |
1539 | 1540 | | |
1540 | 1541 | | |
1541 | 1542 | | |
| |||
1580 | 1581 | | |
1581 | 1582 | | |
1582 | 1583 | | |
1583 | | - | |
| 1584 | + | |
1584 | 1585 | | |
1585 | 1586 | | |
1586 | 1587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
191 | 196 | | |
192 | 197 | | |
193 | 198 | | |
| |||
0 commit comments