- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit244413f
committed
Add missing buffer lock acquisition in GetTupleForTrigger().
If we had not been holding buffer pin continuously since the tuple wasinitially fetched by the UPDATE or DELETE query, it would be possible forVACUUM or a page-prune operation to move the tuple while we're trying tocopy it. This would result in a garbage "old" tuple value being passed toan AFTER ROW UPDATE or AFTER ROW DELETE trigger. The preconditions forthis are somewhat improbable, and the timing constraints are very tight;so it's not so surprising that this hasn't been reported from the field,even though the bug has been there a long time.Problem found by Andres Freund. Back-patch to all active branches.1 parent9837be9 commit244413f
1 file changed
+12
-0
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2144 | 2144 |
| |
2145 | 2145 |
| |
2146 | 2146 |
| |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
2147 | 2157 |
| |
2148 | 2158 |
| |
2149 | 2159 |
| |
| |||
2153 | 2163 |
| |
2154 | 2164 |
| |
2155 | 2165 |
| |
| 2166 | + | |
| 2167 | + | |
2156 | 2168 |
| |
2157 | 2169 |
| |
2158 | 2170 |
| |
|
0 commit comments
Comments
(0)