pgsql: Be more consistent about whether to update the FSM while vacuumi

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Be more consistent about whether to update the FSM while vacuumi
Дата
Msg-id E1rPp0K-001j91-5z@gemulon.postgresql.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Support identity columns in partitioned tables
Следующее
От: David Rowley
Дата:
Сообщение: pgsql: Fix REALLOCATE_BITMAPSETS code