aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/spgist/spgdoinsert.c
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2021-04-05 13:21:44 -0700
committerPeter Geoghegan <pg@bowt.ie>2021-04-05 13:21:44 -0700
commitb4af70cb210393c9c8f41643acf6b213e21178e7 (patch)
tree6941f50913208c201398cac548925aeddea0b7ac /src/backend/access/spgist/spgdoinsert.c
parent6c3ffd697e2242f5497ea4b40fffc8f6f922ff60 (diff)
downloadpostgresql-b4af70cb210393c9c8f41643acf6b213e21178e7.tar.gz
postgresql-b4af70cb210393c9c8f41643acf6b213e21178e7.zip
Simplify state managed by VACUUM.
Reorganize the state struct used by VACUUM -- group related items together to make it easier to understand. Also stop relying on stack variables inside lazy_scan_heap() -- move those into the state struct instead. Doing things this way simplifies large groups of related functions whose function signatures had a lot of unnecessary redundancy. Switch over to using int64 for the struct fields used to count things that are reported to the user via log_autovacuum and VACUUM VERBOSE output. We were using double, but that doesn't seem to have any advantages. Using int64 makes it possible to add assertions that verify that the first pass over the heap (pruning) encounters precisely the same number of LP_DEAD items that get deleted from indexes later on, in the second pass over the heap. These assertions will be added in later commits. Finally, adjust the signatures of functions with IndexBulkDeleteResult pointer arguments in cases where there was ambiguity about whether or not the argument relates to a single index or all indexes. Functions now use the idiom that both ambulkdelete() and amvacuumcleanup() have always used (where appropriate): accept a mutable IndexBulkDeleteResult pointer argument, and return a result IndexBulkDeleteResult pointer to caller. Author: Peter Geoghegan <pg@bowt.ie> Reviewed-By: Masahiko Sawada <sawada.mshk@gmail.com> Reviewed-By: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/CAH2-WzkeOSYwC6KNckbhk2b1aNnWum6Yyn0NKP9D-Hq1LGTDPw@mail.gmail.com
Diffstat (limited to 'src/backend/access/spgist/spgdoinsert.c')
0 files changed, 0 insertions, 0 deletions