- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitfdc7efc
committed
Allow pg_class xid & multixid horizons to not be set.
This allows table AMs that don't need these horizons. This was alreadydocumented in the tableam relation_set_new_filenode callback, but anassert prevented if from actually working (the test AM code containedthe change itself). Defang the asserts in the general code, and movethe stronger ones into heap AM.Relatedly, after CLUSTER/VACUUM, we'd always assign a relfrozenxid /relminmxid. Change the table_relation_copy_for_cluster() interface toallow the AM to overwrite the horizons that get set on the pg_classentry. This'd also in the future allow AMs like heap to compute arelfrozenxid during rewrite that's the table's actual minimum ratherthan a pre-determined value. Arguably it'd have been better to movethe whole computation / setting of those values into the callback, butit seems likely that for other reasons it'd be better to be able touse one value to vacuum/cluster multiple tables (e.g. a toast'shorizon shouldn't be different than the table's).Reported-By: Heikki LinnakangasAuthor: Andres FreundDiscussion:https://postgr.es/m/9a7fb9cc-2419-5db7-8840-ddc10c93f122@iki.fi1 parent7ad1cd3 commitfdc7efc
File tree
6 files changed
+83
-45
lines changed- src
- backend
- access/heap
- commands
- postmaster
- include/access
6 files changed
+83
-45
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
668 | 668 |
| |
669 | 669 |
| |
670 | 670 |
| |
671 |
| - | |
672 |
| - | |
| 671 | + | |
| 672 | + | |
673 | 673 |
| |
674 | 674 |
| |
675 | 675 |
| |
| |||
707 | 707 |
| |
708 | 708 |
| |
709 | 709 |
| |
710 |
| - | |
711 |
| - | |
| 710 | + | |
| 711 | + | |
712 | 712 |
| |
713 | 713 |
| |
714 | 714 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
213 | 213 |
| |
214 | 214 |
| |
215 | 215 |
| |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
216 | 220 |
| |
217 | 221 |
| |
218 | 222 |
| |
|
Lines changed: 14 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
870 | 870 |
| |
871 | 871 |
| |
872 | 872 |
| |
873 |
| - | |
| 873 | + | |
| 874 | + | |
874 | 875 |
| |
875 | 876 |
| |
876 | 877 |
| |
877 | 878 |
| |
878 | 879 |
| |
879 |
| - | |
| 880 | + | |
| 881 | + | |
880 | 882 |
| |
881 | 883 |
| |
882 |
| - | |
883 |
| - | |
884 |
| - | |
885 |
| - | |
886 | 884 |
| |
887 | 885 |
| |
888 | 886 |
| |
| |||
915 | 913 |
| |
916 | 914 |
| |
917 | 915 |
| |
918 |
| - | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
919 | 919 |
| |
920 | 920 |
| |
921 |
| - | |
| 921 | + | |
922 | 922 |
| |
923 | 923 |
| |
924 | 924 |
| |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
925 | 929 |
| |
926 | 930 |
| |
927 | 931 |
| |
| |||
1118 | 1122 |
| |
1119 | 1123 |
| |
1120 | 1124 |
| |
1121 |
| - | |
| 1125 | + | |
| 1126 | + | |
1122 | 1127 |
| |
1123 |
| - | |
1124 | 1128 |
| |
1125 | 1129 |
| |
1126 | 1130 |
| |
|
Lines changed: 39 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1313 | 1313 |
| |
1314 | 1314 |
| |
1315 | 1315 |
| |
1316 |
| - | |
| 1316 | + | |
1317 | 1317 |
| |
1318 | 1318 |
| |
1319 | 1319 |
| |
1320 | 1320 |
| |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1321 | 1324 |
| |
1322 |
| - | |
1323 |
| - | |
1324 |
| - | |
| 1325 | + | |
1325 | 1326 |
| |
1326 | 1327 |
| |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
1327 | 1334 |
| |
1328 | 1335 |
| |
1329 | 1336 |
| |
1330 | 1337 |
| |
1331 |
| - | |
1332 |
| - | |
| 1338 | + | |
| 1339 | + | |
1333 | 1340 |
| |
1334 |
| - | |
1335 |
| - | |
| 1341 | + | |
| 1342 | + | |
1336 | 1343 |
| |
1337 |
| - | |
1338 |
| - | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
1339 | 1356 |
| |
1340 | 1357 |
| |
1341 |
| - | |
1342 |
| - | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
1343 | 1366 |
| |
1344 |
| - | |
1345 |
| - | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1346 | 1371 |
| |
1347 | 1372 |
| |
1348 | 1373 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3033 | 3033 |
| |
3034 | 3034 |
| |
3035 | 3035 |
| |
3036 |
| - | |
3037 |
| - | |
| 3036 | + | |
| 3037 | + | |
3038 | 3038 |
| |
3039 | 3039 |
| |
3040 | 3040 |
| |
|
Lines changed: 20 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
452 | 452 |
| |
453 | 453 |
| |
454 | 454 |
| |
455 |
| - | |
456 |
| - | |
| 455 | + | |
| 456 | + | |
457 | 457 |
| |
458 | 458 |
| |
459 | 459 |
| |
| |||
1297 | 1297 |
| |
1298 | 1298 |
| |
1299 | 1299 |
| |
1300 |
| - | |
1301 |
| - | |
1302 |
| - | |
1303 |
| - | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
1304 | 1310 |
| |
1305 |
| - | |
1306 |
| - | |
1307 |
| - | |
1308 |
| - | |
1309 |
| - | |
1310 |
| - | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1311 | 1316 |
| |
1312 | 1317 |
| |
1313 | 1318 |
| |
1314 | 1319 |
| |
1315 | 1320 |
| |
1316 | 1321 |
| |
1317 |
| - | |
1318 |
| - | |
| 1322 | + | |
| 1323 | + | |
1319 | 1324 |
| |
1320 | 1325 |
| |
1321 | 1326 |
| |
1322 | 1327 |
| |
1323 | 1328 |
| |
1324 | 1329 |
| |
1325 |
| - | |
| 1330 | + | |
1326 | 1331 |
| |
1327 | 1332 |
| |
1328 | 1333 |
| |
|
0 commit comments
Comments
(0)