Commit e810ac8
Add FIRST N and N (...) priority syntax to synchronized_standby_slots
Extend synchronized_standby_slots to support explicit priority
forms aligned with synchronous_standby_names.
- FIRST N (slot1, slot2, ...)
- N (slot1, slot2, ...) as shorthand for FIRST N
Implementation details:
- Use the SYNC_REP_DEFAULT parser distinction from the earlier
refactor so plain-list syntax remains separate from priority
syntax.
- Extend StandbySlotsHaveCaughtup() priority handling.
- Select slots in list order.
- Skip missing, logical, invalidated, and inactive lagging slots.
- Wait for active lagging higher-priority slots.
- Clarify duplicate handling for priority syntax in the
synchronized_standby_slots documentation.
- Simplify caught-up comments and clarify standby confirmation
wait comments to match the final control flow.
Tests and docs:
- Add coverage for FIRST behavior and shorthand N (...) behavior.
- Add plain-list disambiguation with first-prefixed slot names.
- Add FIRST duplicate-entry recovery coverage to show duplicates
do not create extra priority positions.
- Update docs for FIRST and shorthand priority syntax semantics.
- Clarify that duplicate slot names are ignored in priority-based
forms and preserve first-occurrence order.
Author: Satya Narlapuram <satyanarlapuram@gmail.com>
Author: Ashutosh Sharma <ashu.coek88@gmail.com>
Reviewed-by: Shveta Malik <shveta.malik@gmail.com>
Reviewed-by: Ajin Cherian <itsajin@gmail.com>
Reviewed-by: Hou, Zhijie <houzj.fnst@fujitsu.com>
Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>
Reviewed-by: Surya Poondla <suryapoondla4@gmail.com>
Reviewed-by: Japin Li <japinli@hotmail.com>
Reviewed-by: Shlok Kyal <shlok.kyal.oss@gmail.com>1 parent 84b1c77 commit e810ac8
3 files changed
Lines changed: 257 additions & 47 deletions
File tree
- doc/src/sgml
- src
- backend/replication
- test/recovery/t
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5274 | 5274 | | |
5275 | 5275 | | |
5276 | 5276 | | |
| 5277 | + | |
5277 | 5278 | | |
5278 | 5279 | | |
5279 | 5280 | | |
| |||
5285 | 5286 | | |
5286 | 5287 | | |
5287 | 5288 | | |
5288 | | - | |
5289 | | - | |
5290 | | - | |
| 5289 | + | |
| 5290 | + | |
| 5291 | + | |
| 5292 | + | |
| 5293 | + | |
| 5294 | + | |
| 5295 | + | |
| 5296 | + | |
| 5297 | + | |
| 5298 | + | |
| 5299 | + | |
| 5300 | + | |
| 5301 | + | |
| 5302 | + | |
| 5303 | + | |
| 5304 | + | |
| 5305 | + | |
| 5306 | + | |
5291 | 5307 | | |
5292 | 5308 | | |
5293 | 5309 | | |
| |||
5324 | 5340 | | |
5325 | 5341 | | |
5326 | 5342 | | |
5327 | | - | |
5328 | | - | |
5329 | | - | |
5330 | | - | |
5331 | | - | |
| 5343 | + | |
| 5344 | + | |
| 5345 | + | |
| 5346 | + | |
| 5347 | + | |
| 5348 | + | |
| 5349 | + | |
| 5350 | + | |
| 5351 | + | |
5332 | 5352 | | |
5333 | 5353 | | |
5334 | 5354 | | |
5335 | 5355 | | |
5336 | 5356 | | |
5337 | | - | |
5338 | | - | |
5339 | | - | |
| 5357 | + | |
| 5358 | + | |
| 5359 | + | |
| 5360 | + | |
| 5361 | + | |
| 5362 | + | |
5340 | 5363 | | |
5341 | 5364 | | |
5342 | 5365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3070 | 3070 | | |
3071 | 3071 | | |
3072 | 3072 | | |
| 3073 | + | |
| 3074 | + | |
3073 | 3075 | | |
3074 | 3076 | | |
3075 | 3077 | | |
| |||
3110 | 3112 | | |
3111 | 3113 | | |
3112 | 3114 | | |
3113 | | - | |
3114 | | - | |
3115 | | - | |
3116 | | - | |
3117 | | - | |
3118 | | - | |
3119 | | - | |
3120 | | - | |
3121 | 3115 | | |
3122 | 3116 | | |
3123 | 3117 | | |
| |||
3339 | 3333 | | |
3340 | 3334 | | |
3341 | 3335 | | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
3342 | 3342 | | |
3343 | 3343 | | |
3344 | 3344 | | |
| |||
3389 | 3389 | | |
3390 | 3390 | | |
3391 | 3391 | | |
3392 | | - | |
3393 | | - | |
3394 | | - | |
3395 | | - | |
3396 | | - | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
3397 | 3400 | | |
3398 | 3401 | | |
3399 | 3402 | | |
| |||
3476 | 3479 | | |
3477 | 3480 | | |
3478 | 3481 | | |
3479 | | - | |
3480 | | - | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
3481 | 3485 | | |
3482 | 3486 | | |
3483 | 3487 | | |
3484 | 3488 | | |
3485 | 3489 | | |
3486 | 3490 | | |
3487 | 3491 | | |
3488 | | - | |
| 3492 | + | |
| 3493 | + | |
| 3494 | + | |
3489 | 3495 | | |
3490 | 3496 | | |
3491 | 3497 | | |
| |||
3498 | 3504 | | |
3499 | 3505 | | |
3500 | 3506 | | |
3501 | | - | |
| 3507 | + | |
3502 | 3508 | | |
3503 | 3509 | | |
3504 | 3510 | | |
| |||
3513 | 3519 | | |
3514 | 3520 | | |
3515 | 3521 | | |
3516 | | - | |
3517 | | - | |
| 3522 | + | |
| 3523 | + | |
3518 | 3524 | | |
3519 | 3525 | | |
3520 | 3526 | | |
| |||
0 commit comments