pgsql: Update high level vacuumlazy.c comments. - Mailing list pgsql-committers

From Peter Geoghegan
Subject pgsql: Update high level vacuumlazy.c comments.
Date
Msg-id E1mr6E8-0000x1-SN@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Update high level vacuumlazy.c comments.  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-committers
Update high level vacuumlazy.c comments.

Update vacuumlazy.c file header comments (as well as comments above the
lazy_scan_heap function) that were largely written before the
introduction of the HOT optimization, when lazy_scan_heap did far less,
and didn't actually prune during its initial heap pass.

Since lazy_scan_heap now outsources far more work to lower level
functions, it makes sense to introduce the function by talking about the
high level invariant that dictates the order in which each phase takes
place.  Also deemphasize the case where we run out of memory for TIDs,
since delaying that discussion makes it easier to talk about issues of
central importance.

Finally, remove discussion of parallel VACUUM from header comments.
These don't add much, and are in the wrong place.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/12b5ade9023f3ecaddcbc423a22dc284c91c79f6

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 138 ++++++++++++++++++-----------------
1 file changed, 70 insertions(+), 68 deletions(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: xlog.c: Remove global variables ReadRecPtr and EndRecPtr.
Next
From: Peter Geoghegan
Date:
Subject: pgsql: vacuumlazy.c: prefer the term "cleanup lock".