forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite6d0d16
committed
Don't throw an error if a queued AFTER trigger no longer exists.
afterTriggerInvokeEvents and AfterTriggerExecute have alwaystreated it as an error if the trigger OID mentioned in a queuedafter-trigger event can't be found. However, that fails toaccount for the edge case where the trigger's been dropped inthe current transaction since queueing the event. There seemsno very good reason to disallow that case, so instead silentlydo nothing if the trigger OID can't be found.This does give up a little bit of bug-detection ability, but I don'trecall that these error messages have ever actually revealed a bug,so it seems mostly theoretical. Alternatives such as markingpending events DONE at the time of dropping a trigger would becomplicated and perhaps introduce bugs of their own.Per bug #18517 from Alexander Lakhin. Back-patch to allsupported branches.Discussion:https://postgr.es/m/18517-af2d19882240902c@postgresql.org1 parentab4346e commite6d0d16
File tree
3 files changed
+32
-5
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+32
-5
lines changedLines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4289 | 4289 |
| |
4290 | 4290 |
| |
4291 | 4291 |
| |
4292 |
| - | |
| 4292 | + | |
| 4293 | + | |
| 4294 | + | |
4293 | 4295 |
| |
| 4296 | + | |
| 4297 | + | |
4294 | 4298 |
| |
4295 | 4299 |
| |
4296 | 4300 |
| |
| |||
4300 | 4304 |
| |
4301 | 4305 |
| |
4302 | 4306 |
| |
4303 |
| - | |
| 4307 | + | |
4304 | 4308 |
| |
4305 | 4309 |
| |
4306 | 4310 |
| |
| |||
4681 | 4685 |
| |
4682 | 4686 |
| |
4683 | 4687 |
| |
| 4688 | + | |
4684 | 4689 |
| |
4685 | 4690 |
| |
4686 | 4691 |
| |
| |||
4696 | 4701 |
| |
4697 | 4702 |
| |
4698 | 4703 |
| |
4699 |
| - | |
4700 |
| - | |
4701 |
| - | |
4702 | 4704 |
| |
4703 | 4705 |
| |
4704 | 4706 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3372 | 3372 |
| |
3373 | 3373 |
| |
3374 | 3374 |
| |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
3375 | 3386 |
| |
3376 | 3387 |
| |
3377 | 3388 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2478 | 2478 |
| |
2479 | 2479 |
| |
2480 | 2480 |
| |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
2481 | 2495 |
| |
2482 | 2496 |
| |
2483 | 2497 |
| |
|
0 commit comments
Comments
(0)