- Notifications
You must be signed in to change notification settings - Fork5.2k
Commitd9f01a2
Amit Kapila
Fix a deadlock during ALTER SUBSCRIPTION ... DROP PUBLICATION.
A deadlock can occur when the DDL command and the apply worker acquirecatalog locks in different orders while dropping replication origins.The issue is rare in PG16 and higher branches because, in most cases, thetablesync worker performs the origin drop in those branches, and itslocking sequence does not conflict with DDL operations.This patch ensures consistent lock acquisition to prevent such deadlocks.As per buildfarm.Reported-by: Alexander Lakhin <exclusion@gmail.com>Author: Ajin Cherian <itsajin@gmail.com>Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>Reviewed-by: vignesh C <vignesh21@gmail.com>Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>Backpatch-through: 14, where it was introducedDiscussion:https://postgr.es/m/bab95e12-6cc5-4ebb-80a8-3e41956aa297@gmail.com1 parent8891433 commitd9f01a2
File tree
3 files changed
+49
-8
lines changed- src
- backend
- catalog
- replication/logical
- include/catalog
3 files changed
+49
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
| 322 | + | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
331 | 334 | | |
332 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
333 | 348 | | |
334 | 349 | | |
335 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
| 320 | + | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| |||
425 | 426 | | |
426 | 427 | | |
427 | 428 | | |
| 429 | + | |
428 | 430 | | |
429 | 431 | | |
430 | 432 | | |
| |||
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
495 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
496 | 508 | | |
497 | 509 | | |
498 | 510 | | |
| |||
504 | 516 | | |
505 | 517 | | |
506 | 518 | | |
507 | | - | |
| 519 | + | |
508 | 520 | | |
509 | 521 | | |
510 | 522 | | |
| |||
555 | 567 | | |
556 | 568 | | |
557 | 569 | | |
| 570 | + | |
| 571 | + | |
558 | 572 | | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
559 | 578 | | |
560 | 579 | | |
561 | 580 | | |
| |||
622 | 641 | | |
623 | 642 | | |
624 | 643 | | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
625 | 649 | | |
626 | 650 | | |
627 | 651 | | |
| |||
1413 | 1437 | | |
1414 | 1438 | | |
1415 | 1439 | | |
1416 | | - | |
| 1440 | + | |
| 1441 | + | |
1417 | 1442 | | |
1418 | 1443 | | |
1419 | 1444 | | |
| |||
1546 | 1571 | | |
1547 | 1572 | | |
1548 | 1573 | | |
1549 | | - | |
| 1574 | + | |
| 1575 | + | |
1550 | 1576 | | |
1551 | 1577 | | |
1552 | 1578 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments
Comments
(0)