forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9f83468
committed
Remove unneeded "pin scan" nbtree VACUUM code.
The REDO routine for nbtree's xl_btree_vacuum record type hasn'tperformed a "pin scan" since commit3e4b7d8 went in, so clearly thereisn't any point in VACUUM WAL-logging information that won't actually beused. Finish off the work of commit3e4b7d8 (and the closely relatedpreceding commit687f2cd) by removing the code that generates thisunused information. Also remove the REDO routine code disabled bycommit3e4b7d8.Replace the unneeded lastBlockVacuumed field in xl_btree_vacuum with anew "ndeleted" field. The new field isn't actually needed right now,since we could continue to infer the array length from the overallrecord length. However, an upcoming patch to add deduplication tonbtree needs to add an "items updated" field to xl_btree_vacuum, so wemight as well start being explicit about the number of items now.(Besides, it doesn't seem like a good idea to leave the xl_btree_vacuumstruct without any fields; the C standard says that that's undefined.)nbtree VACUUM no longer forces writing a WAL record for the last blockin the index. Writing out a WAL record with no items for the finalblock was supposed to force processing of a lastBlockVacuumed field by apin scan.Bump XLOG_PAGE_MAGIC because xl_btree_vacuum changed.Discussion:https://postgr.es/m/CAH2-WzmY_mT7UnTzFB5LBQDBkKpdV5UxP3B5bLb7uP%3D%3D6UQJRQ%40mail.gmail.com1 parentb93e9a5 commit9f83468
8 files changed
+101
-245
lines changedLines changed: 43 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
508 | 508 |
| |
509 | 509 |
| |
510 | 510 |
| |
511 |
| - | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
512 | 514 |
| |
513 | 515 |
| |
514 | 516 |
| |
| |||
528 | 530 |
| |
529 | 531 |
| |
530 | 532 |
| |
531 |
| - | |
| 533 | + | |
532 | 534 |
| |
533 | 535 |
| |
534 | 536 |
| |
| |||
537 | 539 |
| |
538 | 540 |
| |
539 | 541 |
| |
540 |
| - | |
541 |
| - | |
542 |
| - | |
543 |
| - | |
544 |
| - | |
545 |
| - | |
546 |
| - | |
547 |
| - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
548 | 565 |
| |
549 | 566 |
| |
550 | 567 |
| |
551 | 568 |
| |
552 |
| - | |
553 |
| - | |
| 569 | + | |
| 570 | + | |
554 | 571 |
| |
555 | 572 |
| |
556 |
| - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
557 | 577 |
| |
558 | 578 |
| |
559 | 579 |
| |
| |||
562 | 582 |
| |
563 | 583 |
| |
564 | 584 |
| |
565 |
| - | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
566 | 589 |
| |
567 |
| - | |
568 |
| - | |
569 |
| - | |
570 |
| - | |
571 |
| - | |
572 |
| - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
573 | 596 |
| |
574 | 597 |
| |
575 | 598 |
| |
|
Lines changed: 15 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
968 | 968 |
| |
969 | 969 |
| |
970 | 970 |
| |
971 |
| - | |
| 971 | + | |
972 | 972 |
| |
973 |
| - | |
974 |
| - | |
975 |
| - | |
976 |
| - | |
977 |
| - | |
978 |
| - | |
979 |
| - | |
980 |
| - | |
981 |
| - | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
982 | 977 |
| |
983 | 978 |
| |
984 | 979 |
| |
985 |
| - | |
986 |
| - | |
| 980 | + | |
987 | 981 |
| |
988 | 982 |
| |
989 | 983 |
| |
990 | 984 |
| |
| 985 | + | |
| 986 | + | |
| 987 | + | |
991 | 988 |
| |
992 | 989 |
| |
993 | 990 |
| |
994 | 991 |
| |
995 |
| - | |
996 |
| - | |
| 992 | + | |
997 | 993 |
| |
998 | 994 |
| |
999 | 995 |
| |
| |||
1019 | 1015 |
| |
1020 | 1016 |
| |
1021 | 1017 |
| |
1022 |
| - | |
| 1018 | + | |
1023 | 1019 |
| |
1024 | 1020 |
| |
1025 | 1021 |
| |
| |||
1030 | 1026 |
| |
1031 | 1027 |
| |
1032 | 1028 |
| |
1033 |
| - | |
1034 |
| - | |
| 1029 | + | |
| 1030 | + | |
1035 | 1031 |
| |
1036 | 1032 |
| |
1037 | 1033 |
| |
| |||
1050 | 1046 |
| |
1051 | 1047 |
| |
1052 | 1048 |
| |
1053 |
| - | |
1054 |
| - | |
| 1049 | + | |
| 1050 | + | |
1055 | 1051 |
| |
1056 | 1052 |
| |
1057 | 1053 |
| |
|
Lines changed: 23 additions & 88 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 |
| - | |
50 |
| - | |
51 | 49 |
| |
52 | 50 |
| |
53 | 51 |
| |
| |||
978 | 976 |
| |
979 | 977 |
| |
980 | 978 |
| |
981 |
| - | |
982 |
| - | |
983 | 979 |
| |
984 | 980 |
| |
985 | 981 |
| |
| |||
1040 | 1036 |
| |
1041 | 1037 |
| |
1042 | 1038 |
| |
1043 |
| - | |
1044 |
| - | |
1045 |
| - | |
1046 |
| - | |
1047 |
| - | |
1048 |
| - | |
1049 |
| - | |
1050 |
| - | |
1051 |
| - | |
1052 |
| - | |
1053 |
| - | |
1054 |
| - | |
1055 |
| - | |
1056 |
| - | |
1057 |
| - | |
1058 |
| - | |
1059 |
| - | |
1060 |
| - | |
1061 |
| - | |
1062 |
| - | |
1063 |
| - | |
1064 |
| - | |
1065 |
| - | |
1066 |
| - | |
1067 |
| - | |
1068 |
| - | |
1069 |
| - | |
1070 |
| - | |
1071 |
| - | |
1072 |
| - | |
1073 |
| - | |
1074 |
| - | |
1075 |
| - | |
1076 | 1039 |
| |
1077 | 1040 |
| |
1078 | 1041 |
| |
| |||
1203 | 1166 |
| |
1204 | 1167 |
| |
1205 | 1168 |
| |
1206 |
| - | |
1207 |
| - | |
1208 |
| - | |
1209 |
| - | |
1210 |
| - | |
1211 |
| - | |
1212 |
| - | |
1213 | 1169 |
| |
1214 | 1170 |
| |
1215 | 1171 |
| |
| |||
1225 | 1181 |
| |
1226 | 1182 |
| |
1227 | 1183 |
| |
1228 |
| - | |
1229 |
| - | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
1230 | 1188 |
| |
1231 | 1189 |
| |
1232 | 1190 |
| |
| |||
1245 | 1203 |
| |
1246 | 1204 |
| |
1247 | 1205 |
| |
1248 |
| - | |
1249 |
| - | |
1250 |
| - | |
1251 |
| - | |
1252 |
| - | |
1253 |
| - | |
1254 |
| - | |
1255 |
| - | |
1256 |
| - | |
1257 |
| - | |
1258 |
| - | |
1259 |
| - | |
1260 |
| - | |
1261 |
| - | |
1262 |
| - | |
1263 |
| - | |
1264 |
| - | |
1265 |
| - | |
1266 |
| - | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
1267 | 1224 |
| |
1268 | 1225 |
| |
1269 | 1226 |
| |
| |||
1276 | 1233 |
| |
1277 | 1234 |
| |
1278 | 1235 |
| |
1279 |
| - | |
1280 |
| - | |
1281 |
| - | |
1282 |
| - | |
1283 |
| - | |
1284 |
| - | |
1285 |
| - | |
1286 |
| - | |
1287 |
| - | |
1288 |
| - | |
1289 |
| - | |
1290 |
| - | |
1291 |
| - | |
1292 |
| - | |
1293 |
| - | |
1294 |
| - | |
1295 |
| - | |
1296 |
| - | |
1297 |
| - | |
1298 |
| - | |
1299 |
| - | |
1300 |
| - | |
1301 |
| - | |
| 1236 | + | |
1302 | 1237 |
| |
1303 | 1238 |
| |
1304 | 1239 |
| |
|
0 commit comments
Comments
(0)