forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4eafdcc
committed
Prevent logical rep workers with removed subscriptions from starting.
Any logical rep workers must have their subscription entries inpg_subscription. To ensure this, we need to prevent the launcherfrom starting new worker corresponding to the subscription thatDROP SUBSCRIPTION command is removing. To implement this,previously LogicalRepLauncherLock was introduced and held untilthe end of transaction running DROP SUBSCRIPTION. But usingLWLock for that purpose was not valid.Instead, this commit changes DROP SUBSCRIPTION so that it takesAccessExclusiveLock on pg_subscription, in order to ensure thatthe launcher cannot see any subscriptions being removed. Also thiscommit gets rid of LogicalRepLauncherLock.Patch by me, reviewed by Petr JelinekDiscussion:https://www.postgresql.org/message-id/CAHGQGwHPi8ky-yANFfe0sgmhKtsYcQLTnKx07bW9S7-Rn1746w@mail.gmail.com1 parenta9f66f9 commit4eafdcc
File tree
3 files changed
+7
-18
lines changed- src/backend
- commands
- replication/logical
- storage/lmgr
3 files changed
+7
-18
lines changedLines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
461 | 461 |
| |
462 | 462 |
| |
463 | 463 |
| |
464 |
| - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
465 | 470 |
| |
466 | 471 |
| |
467 | 472 |
| |
| |||
528 | 533 |
| |
529 | 534 |
| |
530 | 535 |
| |
531 |
| - | |
532 |
| - | |
533 |
| - | |
534 | 536 |
| |
535 | 537 |
| |
536 | 538 |
| |
537 |
| - | |
538 |
| - | |
539 | 539 |
| |
540 | 540 |
| |
541 | 541 |
| |
|
Lines changed: 0 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
305 | 305 |
| |
306 | 306 |
| |
307 | 307 |
| |
308 |
| - | |
309 |
| - | |
310 |
| - | |
311 | 308 |
| |
312 | 309 |
| |
313 | 310 |
| |
314 | 311 |
| |
315 | 312 |
| |
316 | 313 |
| |
317 |
| - | |
318 |
| - | |
319 | 314 |
| |
320 | 315 |
| |
321 | 316 |
| |
| |||
602 | 597 |
| |
603 | 598 |
| |
604 | 599 |
| |
605 |
| - | |
606 |
| - | |
607 |
| - | |
608 | 600 |
| |
609 | 601 |
| |
610 | 602 |
| |
| |||
628 | 620 |
| |
629 | 621 |
| |
630 | 622 |
| |
631 |
| - | |
632 |
| - | |
633 | 623 |
| |
634 | 624 |
| |
635 | 625 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
52 |
| - | |
| 51 | + |
0 commit comments
Comments
(0)