pgsql: Be more consistent about whether to update the FSM while vacuumi - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Be more consistent about whether to update the FSM while vacuumi
Date
Msg-id E1rPp0K-001j91-5z@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Be more consistent about whether to update the FSM while vacuuming.

Previously, when lazy_scan_noprune() was called and returned true, we would
update the FSM immediately if the relation had no indexes or if the page
contained no dead items. On the other hand, when lazy_scan_prune() was
called, we would update the FSM if either of those things was true or
if index vacuuming was disabled. Eliminate that behavioral difference by
considering vacrel->do_index_vacuuming in both cases.

Also, make lazy_scan_heap() responsible for deciding whether to update
the FSM, instead of doing it inside lazy_scan_noprune(). This is
more consistent with the lazy_scan_prune() case. lazy_scan_noprune()
still needs an output parameter for whether there are LP_DEAD items
on the page, but the real decision-making now happens in the caller.

Patch by me, reviewed by Peter Geoghegan and Melanie Plageman.

Discussion: http://postgr.es/m/CA+TgmoaOzvN1TcHd9iej=PR3fY40En1USxzOnXSR2CxCLaRM0g@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/45d395cd75ffc5b4c824467140127a5d11696d4c

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 59 ++++++++++++++++++------------------
1 file changed, 30 insertions(+), 29 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Support identity columns in partitioned tables
Next
From: David Rowley
Date:
Subject: pgsql: Fix REALLOCATE_BITMAPSETS code