pgsql: Update FSM after updating VM on-access - Mailing list pgsql-committers

From Melanie Plageman
Subject pgsql: Update FSM after updating VM on-access
Date
Msg-id E1wiJb4-000VZI-2s@gemulon.postgresql.org
Whole thread
Responses Re: pgsql: Update FSM after updating VM on-access
List pgsql-committers
Update FSM after updating VM on-access

b46e1e54d078de allowed setting the VM while on-access pruning, but it
neglected to update the freespace map. Once the page was all-visible,
vacuum could skip it, leading to stale freespace map values and,
effectively, bloat. Fix it by updating the FSM if we updated the VM.

Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru>
Discussion: https://postgr.es/m/flat/CAAKRu_b2StZrEC%3DHmW8LePuQbczyFRnfs8qTAJwn_%3DW76-y24w%40mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e9eaeb04248a8b2cc977440caa1b72174c108c14

Modified Files
--------------
src/backend/access/heap/pruneheap.c | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: bufmgr: Fix order of operations in UnlockBufHdrExt
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: pgsql: Update FSM after updating VM on-access