forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4d2a844
committed
Allow callback functions to deregister themselves during a call.
Fetch the next-item pointer before the call not after, so thatwe aren't dereferencing a dangling pointer if the callbackderegistered itself during the call. The risky coding patternappears in CallXactCallbacks, CallSubXactCallbacks, andResourceOwnerReleaseInternal. (There are some other places thatmight be at hazard if they offered deregistration functionality,but they don't.)I (tgl) considered back-patching this, but desisted because itwouldn't be very safe for extensions to rely on this working inpre-v16 branches.Hao WuDiscussion:https://postgr.es/m/CAH+9SWXTiERkmhRke+QCcc+jRH8d5fFHTxh8ZK0-Yn4BSpyaAg@mail.gmail.com1 parentd84a7b2 commit4d2a844
2 files changed
+18
-3
lines changedLines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3656 | 3656 |
| |
3657 | 3657 |
| |
3658 | 3658 |
| |
| 3659 | + | |
3659 | 3660 |
| |
3660 |
| - | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
| 3664 | + | |
3661 | 3665 |
| |
| 3666 | + | |
3662 | 3667 |
| |
3663 | 3668 |
| |
3664 | 3669 |
| |
| |||
3713 | 3718 |
| |
3714 | 3719 |
| |
3715 | 3720 |
| |
| 3721 | + | |
3716 | 3722 |
| |
3717 |
| - | |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
3718 | 3727 |
| |
| 3728 | + | |
3719 | 3729 |
| |
3720 | 3730 |
| |
3721 | 3731 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
501 | 501 |
| |
502 | 502 |
| |
503 | 503 |
| |
| 504 | + | |
504 | 505 |
| |
505 | 506 |
| |
506 | 507 |
| |
| |||
701 | 702 |
| |
702 | 703 |
| |
703 | 704 |
| |
704 |
| - | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
705 | 709 |
| |
| 710 | + | |
706 | 711 |
| |
707 | 712 |
| |
708 | 713 |
| |
|
0 commit comments
Comments
(0)