forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9864cf8
Flush logical slots to disk during a shutdown checkpoint if required.
It's entirely possible for a logical slot to have a confirmed_flush LSNhigher than the last value saved on disk while not being marked as dirty.Currently, it is not a major problem but a later patch adding support forthe upgrade of slots relies on that value being properly flushed to disk.It can also help avoid processing the same transactions again in someboundary cases after the clean shutdown and restart. Say, we processsome transactions for which we didn't send anything downstream (thechanges got filtered) but the confirm_flush LSN is updated due tokeepalives. As we don't flush the latest value of confirm_flush LSN, itmay lead to processing the same changes again without this patch.The approach taken by this patch has been suggested by Ashutosh Bapat.Author: Vignesh C, Julien Rouhaud, Kuroda HayatoReviewed-by: Amit Kapila, Dilip Kumar, Michael Paquier, Ashutosh Bapat, Peter Smith, Hou ZhijieDiscussion:http://postgr.es/m/CAA4eK1JzJagMmb_E8D4au=GYQkxox0AfNBm1FbP7sy7t4YWXPQ@mail.gmail.comDiscussion:http://postgr.es/m/TYAPR01MB58664C81887B3AF2EB6B16E3F5939@TYAPR01MB5866.jpnprd01.prod.outlook.com1 parent495b31e commit9864cf8
File tree
5 files changed
+145
-6
lines changed- src
- backend
- access/transam
- replication
- include/replication
- test/recovery
- t
5 files changed
+145
-6
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7039 | 7039 |
| |
7040 | 7040 |
| |
7041 | 7041 |
| |
7042 |
| - | |
| 7042 | + | |
7043 | 7043 |
| |
7044 | 7044 |
| |
7045 | 7045 |
| |
|
Lines changed: 33 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
321 | 321 |
| |
322 | 322 |
| |
323 | 323 |
| |
| 324 | + | |
324 | 325 |
| |
325 | 326 |
| |
326 | 327 |
| |
| |||
1572 | 1573 |
| |
1573 | 1574 |
| |
1574 | 1575 |
| |
1575 |
| - | |
1576 |
| - | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
1577 | 1580 |
| |
1578 | 1581 |
| |
1579 |
| - | |
| 1582 | + | |
1580 | 1583 |
| |
1581 | 1584 |
| |
1582 | 1585 |
| |
| |||
1601 | 1604 |
| |
1602 | 1605 |
| |
1603 | 1606 |
| |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
1604 | 1631 |
| |
1605 | 1632 |
| |
1606 | 1633 |
| |
| |||
1873 | 1900 |
| |
1874 | 1901 |
| |
1875 | 1902 |
| |
1876 |
| - | |
| 1903 | + | |
1877 | 1904 |
| |
1878 | 1905 |
| |
1879 | 1906 |
| |
1880 | 1907 |
| |
| 1908 | + | |
1881 | 1909 |
| |
1882 | 1910 |
| |
1883 | 1911 |
| |
| |||
2074 | 2102 |
| |
2075 | 2103 |
| |
2076 | 2104 |
| |
| 2105 | + | |
2077 | 2106 |
| |
2078 | 2107 |
| |
2079 | 2108 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
178 | 178 |
| |
179 | 179 |
| |
180 | 180 |
| |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
181 | 188 |
| |
182 | 189 |
| |
183 | 190 |
| |
| |||
241 | 248 |
| |
242 | 249 |
| |
243 | 250 |
| |
244 |
| - | |
| 251 | + | |
245 | 252 |
| |
246 | 253 |
| |
247 | 254 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| 46 | + | |
46 | 47 |
| |
47 | 48 |
| |
48 | 49 |
|
Lines changed: 102 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + |
0 commit comments
Comments
(0)