Commit 95c5acb
committed
For inplace update, send nontransactional invalidations.
The inplace update survives ROLLBACK. The inval didn't, so another
backend's DDL could then update the row without incorporating the
inplace update. In the test this fixes, a mix of CREATE INDEX and ALTER
TABLE resulted in a table with an index, yet relhasindex=f. That is a
source of index corruption. Back-patch to v12 (all supported versions).
The back branch versions don't change WAL, because those branches just
added end-of-recovery SIResetAll(). All branches change the ABI of
extern function PrepareToInvalidateCacheTuple(). No PGXN extension
calls that, and there's no apparent use case in extensions.
Reviewed by Nitin Motiani and (in earlier versions) Andres Freund.
Discussion: https://postgr.es/m/20240523000548.58.nmisch@google.com1 parent a4668c9 commit 95c5acb
File tree
13 files changed
+320
-137
lines changed- src
- backend
- access
- heap
- transam
- catalog
- commands
- replication/logical
- utils/cache
- include/utils
- test/isolation
- expected
- specs
- tools/pgindent
13 files changed
+320
-137
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6351 | 6351 | | |
6352 | 6352 | | |
6353 | 6353 | | |
| 6354 | + | |
| 6355 | + | |
| 6356 | + | |
| 6357 | + | |
| 6358 | + | |
| 6359 | + | |
| 6360 | + | |
| 6361 | + | |
| 6362 | + | |
| 6363 | + | |
| 6364 | + | |
| 6365 | + | |
| 6366 | + | |
| 6367 | + | |
| 6368 | + | |
| 6369 | + | |
| 6370 | + | |
| 6371 | + | |
6354 | 6372 | | |
6355 | 6373 | | |
6356 | 6374 | | |
| |||
6394 | 6412 | | |
6395 | 6413 | | |
6396 | 6414 | | |
| 6415 | + | |
| 6416 | + | |
| 6417 | + | |
| 6418 | + | |
| 6419 | + | |
| 6420 | + | |
| 6421 | + | |
| 6422 | + | |
| 6423 | + | |
| 6424 | + | |
| 6425 | + | |
| 6426 | + | |
6397 | 6427 | | |
| 6428 | + | |
6398 | 6429 | | |
6399 | | - | |
| 6430 | + | |
6400 | 6431 | | |
6401 | 6432 | | |
6402 | | - | |
6403 | | - | |
6404 | | - | |
6405 | | - | |
6406 | | - | |
6407 | | - | |
| 6433 | + | |
| 6434 | + | |
| 6435 | + | |
| 6436 | + | |
6408 | 6437 | | |
6409 | 6438 | | |
6410 | 6439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1358 | 1358 | | |
1359 | 1359 | | |
1360 | 1360 | | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
1369 | 1379 | | |
1370 | 1380 | | |
1371 | 1381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2889 | 2889 | | |
2890 | 2890 | | |
2891 | 2891 | | |
2892 | | - | |
| 2892 | + | |
2893 | 2893 | | |
2894 | 2894 | | |
2895 | 2895 | | |
2896 | 2896 | | |
2897 | | - | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
2898 | 2905 | | |
2899 | 2906 | | |
2900 | 2907 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
978 | | - | |
979 | | - | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | 978 | | |
984 | 979 | | |
985 | 980 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
512 | | - | |
513 | | - | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
514 | 519 | | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
522 | 523 | | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | 524 | | |
529 | 525 | | |
530 | 526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2288 | 2288 | | |
2289 | 2289 | | |
2290 | 2290 | | |
2291 | | - | |
| 2291 | + | |
| 2292 | + | |
2292 | 2293 | | |
2293 | 2294 | | |
2294 | 2295 | | |
| |||
2329 | 2330 | | |
2330 | 2331 | | |
2331 | 2332 | | |
2332 | | - | |
| 2333 | + | |
2333 | 2334 | | |
2334 | 2335 | | |
2335 | 2336 | | |
| |||
2338 | 2339 | | |
2339 | 2340 | | |
2340 | 2341 | | |
2341 | | - | |
| 2342 | + | |
2342 | 2343 | | |
2343 | 2344 | | |
2344 | 2345 | | |
| |||
0 commit comments