- Notifications
You must be signed in to change notification settings - Fork5
Commit80559fa
committed
I found a corner case in which it is possible for RI_FKey_check's call
of HeapTupleSatisfiesItself() to trigger a hint-bit update on the tuple:if the row was updated or deleted by a subtransaction of my own transactionthat was later rolled back. This cannot occur in pre-8.0 of course, sothe hint-bit patch applied a couple weeks ago is OK for existing releases.But for 8.0 it seems we had better fix things so that RI_FKey_check canpass the correct buffer number to HeapTupleSatisfiesItself. Accordingly,add fields to the TriggerData struct to carry the buffer ID(s) for theold and new tuple(s). There are other possible solutions but this oneseems cleanest; it will allow other AFTER-trigger functions to safelydo tqual.c calls if they want to. Put new fields at end of struct sothat there is no API breakage.1 parent88868d4 commit80559fa
File tree
5 files changed
+73
-24
lines changed- doc/src/sgml
- src
- backend
- commands
- utils/adt
- include/commands
5 files changed
+73
-24
lines changedLines changed: 24 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
256 | 256 |
| |
257 | 257 |
| |
258 | 258 |
| |
| 259 | + | |
| 260 | + | |
259 | 261 |
| |
260 | 262 |
| |
261 | 263 |
| |
| |||
427 | 429 |
| |
428 | 430 |
| |
429 | 431 |
| |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
430 | 453 |
| |
431 | 454 |
| |
432 | 455 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
4256 | 4256 |
| |
4257 | 4257 |
| |
4258 | 4258 |
| |
| 4259 | + | |
| 4260 | + | |
4259 | 4261 |
| |
4260 | 4262 |
| |
4261 | 4263 |
| |
|
Lines changed: 34 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
1192 | 1192 |
| |
1193 | 1193 |
| |
1194 | 1194 |
| |
1195 |
| - | |
1196 | 1195 |
| |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
1197 | 1199 |
| |
1198 | 1200 |
| |
1199 | 1201 |
| |
| |||
1246 | 1248 |
| |
1247 | 1249 |
| |
1248 | 1250 |
| |
| 1251 | + | |
1249 | 1252 |
| |
1250 | 1253 |
| |
1251 | 1254 |
| |
1252 | 1255 |
| |
1253 | 1256 |
| |
1254 | 1257 |
| |
1255 | 1258 |
| |
| 1259 | + | |
1256 | 1260 |
| |
1257 | 1261 |
| |
1258 | 1262 |
| |
| |||
1305 | 1309 |
| |
1306 | 1310 |
| |
1307 | 1311 |
| |
1308 |
| - | |
1309 | 1312 |
| |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1310 | 1316 |
| |
1311 | 1317 |
| |
1312 | 1318 |
| |
| |||
1365 | 1371 |
| |
1366 | 1372 |
| |
1367 | 1373 |
| |
| 1374 | + | |
1368 | 1375 |
| |
1369 | 1376 |
| |
1370 | 1377 |
| |
1371 | 1378 |
| |
1372 | 1379 |
| |
1373 | 1380 |
| |
1374 | 1381 |
| |
| 1382 | + | |
1375 | 1383 |
| |
1376 | 1384 |
| |
1377 | 1385 |
| |
| |||
1434 | 1442 |
| |
1435 | 1443 |
| |
1436 | 1444 |
| |
1437 |
| - | |
1438 | 1445 |
| |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
1439 | 1449 |
| |
1440 | 1450 |
| |
1441 | 1451 |
| |
| |||
1509 | 1519 |
| |
1510 | 1520 |
| |
1511 | 1521 |
| |
| 1522 | + | |
| 1523 | + | |
1512 | 1524 |
| |
1513 | 1525 |
| |
1514 | 1526 |
| |
| |||
1896 | 1908 |
| |
1897 | 1909 |
| |
1898 | 1910 |
| |
1899 |
| - | |
1900 |
| - | |
| 1911 | + | |
| 1912 | + | |
1901 | 1913 |
| |
1902 | 1914 |
| |
1903 | 1915 |
| |
| |||
1942 | 1954 |
| |
1943 | 1955 |
| |
1944 | 1956 |
| |
| 1957 | + | |
| 1958 | + | |
1945 | 1959 |
| |
1946 | 1960 |
| |
1947 | 1961 |
| |
1948 | 1962 |
| |
1949 | 1963 |
| |
| 1964 | + | |
| 1965 | + | |
1950 | 1966 |
| |
1951 | 1967 |
| |
1952 | 1968 |
| |
1953 | 1969 |
| |
1954 | 1970 |
| |
| 1971 | + | |
| 1972 | + | |
1955 | 1973 |
| |
1956 | 1974 |
| |
1957 | 1975 |
| |
| |||
1970 | 1988 |
| |
1971 | 1989 |
| |
1972 | 1990 |
| |
1973 |
| - | |
| 1991 | + | |
1974 | 1992 |
| |
1975 |
| - | |
| 1993 | + | |
1976 | 1994 |
| |
1977 | 1995 |
| |
1978 | 1996 |
| |
| |||
2916 | 2934 |
| |
2917 | 2935 |
| |
2918 | 2936 |
| |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
2919 | 2945 |
| |
2920 | 2946 |
| |
2921 | 2947 |
| |
|
Lines changed: 9 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
186 | 186 |
| |
187 | 187 |
| |
188 | 188 |
| |
| 189 | + | |
189 | 190 |
| |
190 | 191 |
| |
191 | 192 |
| |
| |||
213 | 214 |
| |
214 | 215 |
| |
215 | 216 |
| |
| 217 | + | |
216 | 218 |
| |
217 | 219 |
| |
218 | 220 |
| |
219 | 221 |
| |
220 | 222 |
| |
| 223 | + | |
221 | 224 |
| |
222 | 225 |
| |
223 | 226 |
| |
224 | 227 |
| |
225 | 228 |
| |
226 | 229 |
| |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 | 230 |
| |
233 |
| - | |
| 231 | + | |
| 232 | + | |
234 | 233 |
| |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
| 234 | + | |
| 235 | + | |
240 | 236 |
| |
241 | 237 |
| |
242 | 238 |
| |
243 | 239 |
| |
244 |
| - | |
| 240 | + | |
245 | 241 |
| |
246 | 242 |
| |
247 | 243 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
| 37 | + | |
| 38 | + | |
37 | 39 |
| |
38 | 40 |
| |
39 | 41 |
| |
|
0 commit comments
Comments
(0)