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=pr3fy40en1usxzonxsr2cxclar...@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(-)