Commit 4f95f14
disallow TRUNCATE on user_catalog_table
When TRUNCATE command is executed on user_catalog_table
in synchronous_mode during logial replication, TRUNCATE waits for
the subscriber's synchronization. At the same time, we don't have
a restriction that output plugin cannot take a lock on it. Therefore,
the walsender can hang due to the deadlock to take a new lock
on a user_catalog_table, since the table is locked by TRUNCATE already.
This patch addresses such a deadlock hazards by prohibiting
an operation to issue TRUNCATE on user_catalog_table.1 parent 4069df2 commit 4f95f14
4 files changed
Lines changed: 27 additions & 0 deletions
File tree
- doc/src/sgml/ref
- src
- backend/commands
- test/regress
- expected
- sql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2435 | 2435 | | |
2436 | 2436 | | |
2437 | 2437 | | |
| 2438 | + | |
2438 | 2439 | | |
2439 | 2440 | | |
2440 | 2441 | | |
| |||
2478 | 2479 | | |
2479 | 2480 | | |
2480 | 2481 | | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
2481 | 2494 | | |
2482 | 2495 | | |
2483 | 2496 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
0 commit comments