- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitd4fa18a
committed
Avoid testing tuple visibility without buffer lock in RI_FKey_check().
Despite the argumentation I wrote in commit7a2fe85, it's unsafe to dothis, because in corner cases it's possible for HeapTupleSatisfiesSelfto try to set hint bits on the target tuple; and at least since 8.2 wehave required the buffer content lock to be held while setting hint bits.The added regression test exercises one such corner case. Unpatched, itcauses an assertion failure in assert-enabled builds, or otherwise wouldcause a hint bit change in a buffer we don't hold lock on, which giventhe right race condition could result in checksum failures or other dataconsistency problems. The odds of a problem in the field are probablypretty small, but nonetheless back-patch to all supported branches.Report: <19391.1477244876@sss.pgh.pa.us>1 parent24542e2 commitd4fa18a
File tree
3 files changed
+54
-11
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+54
-11
lines changedLines changed: 9 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
| 45 | + | |
45 | 46 |
| |
46 | 47 |
| |
47 | 48 |
| |
| |||
289 | 290 |
| |
290 | 291 |
| |
291 | 292 |
| |
292 |
| - | |
293 |
| - | |
294 |
| - | |
295 |
| - | |
296 |
| - | |
297 |
| - | |
298 |
| - | |
299 |
| - | |
300 |
| - | |
301 |
| - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
302 | 296 |
| |
303 |
| - | |
| 297 | + | |
304 | 298 |
| |
| 299 | + | |
| 300 | + | |
305 | 301 |
| |
| 302 | + | |
| 303 | + | |
306 | 304 |
| |
307 | 305 |
| |
308 | 306 |
| |
|
Lines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1319 | 1319 |
| |
1320 | 1320 |
| |
1321 | 1321 |
| |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + |
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
943 | 943 |
| |
944 | 944 |
| |
945 | 945 |
| |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + |
0 commit comments
Comments
(0)