From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Be more consistent about whether to update the FSM while vacuumi |
Date: | 2024-01-16 19:21:44 |
Message-ID: | E1rPp0K-001j91-5z@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2024-01-16 20:31:08 | pgsql: Fix REALLOCATE_BITMAPSETS code |
Previous Message | Peter Eisentraut | 2024-01-16 16:30:16 | pgsql: Support identity columns in partitioned tables |