postgresql/src/backend/access
Peter Geoghegan 9dc7251417 Refactor btvacuumpage().
Remove one of the arguments to btvacuumpage(), and give up on the idea
that it's a recursive function.  We now use the term "backtracking" to
refer to the case where an earlier block must be visited to make sure no
tuples that need to be removed were missed.

Advertising btvacuumpage() as a recursive function was unhelpful.  In
reality the function always simulates recursion with a loop (it doesn't
actually call itself).  This wasn't just necessary as a precaution (per
the comments mentioning tail recursion), though.  There is no reliable
natural limit on the number of times we can backtrack.

There are important behavioral difference when "recursing"/backtracking,
mostly related to page deletion.  We don't perform page deletion when
backtracking due to the extra complexity.  And when we recurse, we're
not performing a physical order scan anymore, so we expect fairly
different conditions to hold for the page.  Structuring the code like
this makes it clearer how _bt_pagedel() cooperates with btvacuumpage()
and btvacuumscan() (as established in commit b0229f26 and commit
73a076b0).

Author: Peter Geoghegan
Reviewed-By: Masahiko Sawada
Discussion: https://postgr.es/m/CAH2-WzmRGMDWiLMcb+zagG9652PboNN4Gfcq1Gc_wJL6A716MA@mail.gmail.com
2020-05-02 14:04:33 -07:00
..
brin Implement operator class parameters 2020-03-30 19:17:23 +03:00
common Implement operator class parameters 2020-03-30 19:17:23 +03:00
gin Modify additional power 2 calculations to use new helper functions 2020-04-08 18:29:51 +12:00
gist Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
hash Modify various power 2 calculations to use new helper functions 2020-04-08 16:55:03 +12:00
heap Remove HEAPDEBUGALL 2020-04-22 08:35:33 +02:00
index Remove rudiments of supporting procnum == 0 from 911e702077 2020-03-30 23:43:25 +03:00
nbtree Refactor btvacuumpage(). 2020-05-02 14:04:33 -07:00
rmgrdesc Harmonize nbtree page split point code. 2020-04-13 16:39:55 -07:00
spgist Fix missing SP-GiST support in 911e702077 2020-03-30 23:45:03 +03:00
table Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
tablesample Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
transam Fix some typos 2020-04-27 14:59:36 +09:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00