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

Amit Kapila
Add a failover option to subscriptions.
This commit introduces a new subscription option named 'failover', whichprovides users with the ability to set the failover property of thereplication slot on the publisher when creating or altering asubscription.This uses the replication commands introduced by commit7329240 toenable the failover option for a logical replication slot.If the failover option is set to true, the associated replication slots(i.e. the main slot and the table sync slots) in the upstream database areenabled to be synchronized to the standbys. Note that the capability tosync the replication slots will be added in subsequent commits.Thanks to Masahiko Sawada for the design inputs.Author: Shveta Malik, Hou Zhijie, Ajin CherianReviewed-by: Peter Smith, Bertrand Drouvot, Dilip Kumar, Masahiko Sawada, Nisha Moond, Kuroda Hayato, Amit KapilaDiscussion:https://postgr.es/m/514f6f2f-6833-4539-39f1-96cd1e011f23@enterprisedb.com1 parentb527ebc commit776621a
File tree
21 files changed
+412
-108
lines changed- doc/src/sgml
- ref
- src
- backend
- catalog
- commands
- replication/logical
- bin
- pg_dump
- pg_upgrade/t
- psql
- include/catalog
- test
- recovery
- t
- regress
- expected
- sql
21 files changed
+412
-108
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8000 | 8000 |
| |
8001 | 8001 |
| |
8002 | 8002 |
| |
| 8003 | + | |
| 8004 | + | |
| 8005 | + | |
| 8006 | + | |
| 8007 | + | |
| 8008 | + | |
| 8009 | + | |
| 8010 | + | |
| 8011 | + | |
| 8012 | + | |
| 8013 | + | |
8003 | 8014 |
| |
8004 | 8015 |
| |
8005 | 8016 |
| |
|
Lines changed: 23 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
226 | 226 |
| |
227 | 227 |
| |
228 | 228 |
| |
229 |
| - | |
230 |
| - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
231 | 232 |
| |
232 | 233 |
| |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
233 | 254 |
| |
234 | 255 |
| |
235 | 256 |
| |
|
Lines changed: 19 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
120 |
| - | |
121 |
| - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
122 | 123 |
| |
123 | 124 |
| |
124 | 125 |
| |
125 |
| - | |
| 126 | + | |
| 127 | + | |
126 | 128 |
| |
127 | 129 |
| |
128 | 130 |
| |
129 | 131 |
| |
130 | 132 |
| |
131 | 133 |
| |
132 |
| - | |
| 134 | + | |
| 135 | + | |
133 | 136 |
| |
134 | 137 |
| |
135 | 138 |
| |
| |||
400 | 403 |
| |
401 | 404 |
| |
402 | 405 |
| |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
403 | 418 |
| |
404 | 419 |
| |
405 | 420 |
| |
|
Lines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1588 | 1588 |
| |
1589 | 1589 |
| |
1590 | 1590 |
| |
1591 |
| - | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
1592 | 1598 |
| |
1593 | 1599 |
| |
1594 | 1600 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
73 | 73 |
| |
74 | 74 |
| |
75 | 75 |
| |
| 76 | + | |
76 | 77 |
| |
77 | 78 |
| |
78 | 79 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1358 | 1358 |
| |
1359 | 1359 |
| |
1360 | 1360 |
| |
1361 |
| - | |
| 1361 | + | |
1362 | 1362 |
| |
1363 | 1363 |
| |
1364 | 1364 |
| |
|
Lines changed: 111 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
72 |
| - | |
73 |
| - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
74 | 76 |
| |
75 | 77 |
| |
76 | 78 |
| |
| |||
95 | 97 |
| |
96 | 98 |
| |
97 | 99 |
| |
| 100 | + | |
98 | 101 |
| |
99 | 102 |
| |
100 | 103 |
| |
| |||
155 | 158 |
| |
156 | 159 |
| |
157 | 160 |
| |
| 161 | + | |
| 162 | + | |
158 | 163 |
| |
159 | 164 |
| |
160 | 165 |
| |
| |||
303 | 308 |
| |
304 | 309 |
| |
305 | 310 |
| |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
306 | 320 |
| |
307 | 321 |
| |
308 | 322 |
| |
| |||
388 | 402 |
| |
389 | 403 |
| |
390 | 404 |
| |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
391 | 412 |
| |
392 | 413 |
| |
393 | 414 |
| |
| |||
591 | 612 |
| |
592 | 613 |
| |
593 | 614 |
| |
594 |
| - | |
| 615 | + | |
595 | 616 |
| |
596 | 617 |
| |
597 | 618 |
| |
| |||
697 | 718 |
| |
698 | 719 |
| |
699 | 720 |
| |
| 721 | + | |
700 | 722 |
| |
701 | 723 |
| |
702 | 724 |
| |
| |||
807 | 829 |
| |
808 | 830 |
| |
809 | 831 |
| |
810 |
| - | |
| 832 | + | |
811 | 833 |
| |
812 | 834 |
| |
813 | 835 |
| |
| |||
816 | 838 |
| |
817 | 839 |
| |
818 | 840 |
| |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
819 | 859 |
| |
820 | 860 |
| |
821 | 861 |
| |
| |||
1132 | 1172 |
| |
1133 | 1173 |
| |
1134 | 1174 |
| |
1135 |
| - | |
| 1175 | + | |
| 1176 | + | |
1136 | 1177 |
| |
1137 | 1178 |
| |
1138 | 1179 |
| |
| |||
1211 | 1252 |
| |
1212 | 1253 |
| |
1213 | 1254 |
| |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
1214 | 1280 |
| |
1215 | 1281 |
| |
1216 | 1282 |
| |
| |||
1453 | 1519 |
| |
1454 | 1520 |
| |
1455 | 1521 |
| |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
1456 | 1562 |
| |
1457 | 1563 |
| |
1458 | 1564 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1430 | 1430 |
| |
1431 | 1431 |
| |
1432 | 1432 |
| |
1433 |
| - | |
| 1433 | + | |
1434 | 1434 |
| |
1435 | 1435 |
| |
1436 | 1436 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
132 | 132 |
| |
133 | 133 |
| |
134 | 134 |
| |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
135 | 142 |
| |
136 | 143 |
| |
137 | 144 |
| |
|
0 commit comments
Comments
(0)