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

Amit Kapila
Introduce a new GUC 'standby_slot_names'.
This patch provides a way to ensure that physical standbys that arepotential failover candidates have received and flushed changes beforethe primary server making them visible to subscribers. Doing so guaranteesthat the promoted standby server is not lagging behind the subscriberswhen a failover is necessary.The logical walsender now guarantees that all local changes are sent andflushed to the standby servers corresponding to the replication slotsspecified in 'standby_slot_names' before sending those changes to thesubscriber.Additionally, the SQL functions pg_logical_slot_get_changes,pg_logical_slot_peek_changes and pg_replication_slot_advance are modifiedto ensure that they process changes for failover slots only after physicalslots specified in 'standby_slot_names' have confirmed WAL receipt for those.Author: Hou Zhijie and Shveta MalikReviewed-by: Masahiko Sawada, Peter Smith, Bertrand Drouvot, Ajin Cherian, Nisha Moond, Amit KapilaDiscussion:https://postgr.es/m/514f6f2f-6833-4539-39f1-96cd1e011f23@enterprisedb.com1 parent453c468 commitbf279dd
File tree
18 files changed
+918
-27
lines changed- doc/src/sgml
- src
- backend
- replication
- logical
- utils
- activity
- misc
- include
- replication
- utils
- test/recovery/t
- tools/pgindent
18 files changed
+918
-27
lines changedLines changed: 39 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4559 | 4559 |
| |
4560 | 4560 |
| |
4561 | 4561 |
| |
| 4562 | + | |
| 4563 | + | |
| 4564 | + | |
| 4565 | + | |
| 4566 | + | |
| 4567 | + | |
| 4568 | + | |
| 4569 | + | |
| 4570 | + | |
| 4571 | + | |
| 4572 | + | |
| 4573 | + | |
| 4574 | + | |
| 4575 | + | |
| 4576 | + | |
| 4577 | + | |
| 4578 | + | |
| 4579 | + | |
| 4580 | + | |
| 4581 | + | |
| 4582 | + | |
| 4583 | + | |
| 4584 | + | |
| 4585 | + | |
| 4586 | + | |
| 4587 | + | |
| 4588 | + | |
| 4589 | + | |
| 4590 | + | |
| 4591 | + | |
| 4592 | + | |
| 4593 | + | |
| 4594 | + | |
| 4595 | + | |
| 4596 | + | |
| 4597 | + | |
| 4598 | + | |
| 4599 | + | |
| 4600 | + | |
4562 | 4601 |
| |
4563 | 4602 |
| |
4564 | 4603 |
| |
|
Lines changed: 12 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28150 | 28150 |
| |
28151 | 28151 |
| |
28152 | 28152 |
| |
28153 |
| - | |
| 28153 | + | |
28154 | 28154 |
| |
28155 | 28155 |
| |
28156 | 28156 |
| |
| |||
28173 | 28173 |
| |
28174 | 28174 |
| |
28175 | 28175 |
| |
| 28176 | + | |
| 28177 | + | |
| 28178 | + | |
| 28179 | + | |
28176 | 28180 |
| |
28177 | 28181 |
| |
28178 | 28182 |
| |
28179 | 28183 |
| |
28180 |
| - | |
| 28184 | + | |
28181 | 28185 |
| |
28182 | 28186 |
| |
28183 | 28187 |
| |
| |||
28232 | 28236 |
| |
28233 | 28237 |
| |
28234 | 28238 |
| |
28235 |
| - | |
| 28239 | + | |
28236 | 28240 |
| |
28237 | 28241 |
| |
28238 | 28242 |
| |
| |||
28248 | 28252 |
| |
28249 | 28253 |
| |
28250 | 28254 |
| |
28251 |
| - | |
| 28255 | + | |
| 28256 | + | |
| 28257 | + | |
| 28258 | + | |
| 28259 | + | |
28252 | 28260 |
| |
28253 | 28261 |
| |
28254 | 28262 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
384 | 384 |
| |
385 | 385 |
| |
386 | 386 |
| |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
387 | 399 |
| |
388 | 400 |
| |
389 | 401 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
| 108 | + | |
108 | 109 |
| |
109 | 110 |
| |
110 | 111 |
| |
| |||
224 | 225 |
| |
225 | 226 |
| |
226 | 227 |
| |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
227 | 239 |
| |
228 | 240 |
| |
229 | 241 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
488 | 488 |
| |
489 | 489 |
| |
490 | 490 |
| |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
491 | 495 |
| |
492 | 496 |
| |
493 | 497 |
| |
| |||
857 | 861 |
| |
858 | 862 |
| |
859 | 863 |
| |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
860 | 871 |
| |
861 | 872 |
| |
862 | 873 |
| |
|
0 commit comments
Comments
(0)