Apr 2021

7 commits
Don't truncate heap when VACUUM's failsafe is in effect.
13 Apr 2021Peter Geogheganmaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 100% surewritten from the discussion, no matching patch

Adds the do_failsafe guard to should_attempt_truncation() in vacuumlazy.c following Sawada's proposal in #117; Peter announces the committed fix in #118, without an attached patch.

Teach VACUUM to bypass unnecessary index vacuuming.
7 Apr 2021Peter Geogheganmaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 98% surepart of a posted patchsetlight changesfrom patchset #112

Extracts the performance-bypass portion of #111, including its 2% page threshold and 32MB TID limit, and incorporates the logging rewrite from the latest attachment #112. The failsafe portion lands separately; remaining changes are naming, comments, and log wording.

Add wraparound failsafe to VACUUM.
7 Apr 2021Peter Geogheganmaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 98% surepart of a posted patchsetmoderate changesfrom patchset #1120 of 2 reviewers saw the final version

Extracts the failsafe portion of #111 and incorporates the early-check and parallelism changes from #112, whose adoption is confirmed in #114. Final edits rename internal helpers and lower both GUC defaults from 1.8 to 1.6 billion, as announced in #115.

  • Robert Haassaw an earlier versionLLM analysis, 93% sureReviewing the posted emergency mechanism, Robert argued for configurable thresholds and disabling cost delay in #69, both adopted before further substantial implementation changes in #88.
  • Matthias van de Meentsaw an earlier versionLLM analysis, 94% sureMatthias proposed clarifying the failsafe GUCs' 105% lower-bound documentation in #100, which was incorporated before subsequent startup and parallel-vacuum changes in #111 and #112.
Truncate line pointer array during VACUUM.
7 Apr 2021Peter Geogheganmaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1Also in: Lowering the ever-growing heap->pd_lower (not this thread)
LLM analysis, 99% surepart of a posted patchsetlight changesfrom patchset #1112 of 2 reviewers saw the final version

Takes the complete line-pointer truncation component of #111, with only comment and formatting edits across heapam.c, pruneheap.c, vacuumlazy.c, and bufpage.c. This supersedes the attribution in thread #43824 to #473855: that March source was adapted and reposted here in April, including the latest matching patch.

  • Masahiko Sawadasaw the final versiontrailerSawada reviewed truncation in #99 and #112, including its omission for pages containing only HOT-pruned LP_UNUSED items, which Peter explicitly deferred in #114.
  • Peter Geoghegansaw the final versiontrailerPeter adapted Matthias's implementation to VACUUM's second heap pass in #98, revised it in #111, and reviewed the final version as committer.
Remove tupgone special case from vacuumlazy.c.
6 Apr 2021Peter Geogheganmaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 99% surepart of a posted patchsetlight changesfrom patchset #981 of 2 reviewers saw the final version

Takes the tupgone-removal component of #98, preserving pruning retries, separate PRUNE/VACUUM WAL records, and weaker heap-vacuum buffer locking. Final differences are explanatory comments and the required XLOG_PAGE_MAGIC bump.

  • Andres Freundsaw an earlier versiontrailerAndres challenged the safety of discarding the HEAPTUPLE_DEAD case in #52 and proposed retrying pruning in #55, before the implementation and WAL/locking design were substantially revised.
  • Masahiko Sawadasaw the final versiontrailerSawada examined the WAL split in #74 and explicitly reviewed the final tupgone component in #99, after which only light changes followed.
Refactor lazy_scan_heap() loop.
6 Apr 2021Peter Geogheganmaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 99% surepart of a posted patchsetmoderate changesfrom patchset #980 of 2 reviewers saw the final version

Takes the scan-loop refactoring component of #98, retaining lazy_scan_prune() and the separation of no-index vacuuming from INDEX_CLEANUP=off. Final edits restructure one-pass FSM handling, remove an early return from LP_DEAD collection, and omit the proposed extra VERBOSE counter.

  • Robert Haassaw an earlier versiontrailerRobert's detailed review in #92 challenged the helper-function abstractions and code movement, leading to substantial simplification in #98.
  • Masahiko Sawadasaw an earlier versiontrailerSawada found duplicate counting and an invalid free-space assertion in #74 and #91, then reviewed #98 in #99, before the final local control-flow edits.
Simplify state managed by VACUUM.
5 Apr 2021Peter Geogheganmaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 99% surepart of a posted patchsetmoderate changesfrom patchset #981 of 2 reviewers saw the final version

Takes the state-centralization component of #98, including LVRelState, int64 counters, and clearer index-statistics interfaces. Peter incorporates Sawada's rewrite of parallel_process_one_index() and restores assertions, explicitly confirming these final edits in #101.

  • Masahiko Sawadasaw the final versiontrailerSawada reviewed state and parallel-statistics handling in #91 and #99, supplying the replacement function structure that Peter adopted in #101.
  • Robert Haassaw an earlier versiontrailerRobert reviewed naming, state ownership, parallel initialization, and excessive code movement in #92, before the reduced refactoring and final parallel-statistics changes.

Mar 2021

1 commit
Notice that heap page has dead items during VACUUM.
15 Mar 2021Peter Geogheganmaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 100% surepart of a posted patchsetlight changesfrom patchset #341 of 1 reviewer saw the final version

Extracts the LP_DEAD flag assignment already present in #34, renaming has_dead_tuples to has_dead_items and clarifying its scope. Peter confirms separately committing Sawada's fix in #51.

  • Peter Geoghegansaw the final versioncommittercommitted the patch

Credits across 8 commits

Author
Peter Geoghegan6
Masahiko Sawada3
Matthias van de Meent1
Reviewer
Masahiko Sawada4
Peter Geoghegancommitter2
Robert Haas2
Andres Freund1
Reported by
Masahiko Sawada1
Committer
Peter Geoghegan8