pgsql: Only clear VACUUM's read stream strategy once in failsafe mode

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Only clear VACUUM's read stream strategy once in failsafe mode
Date: 2026-08-07 14:01:43
Message-ID: E1wsL8p-00000000aV3-3T3M@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Only clear VACUUM's read stream strategy once in failsafe mode

112c2683807b4d690 restored failsafe vacuum's abandonment of a buffer
access strategy by clearing the ReadBuffersOperations' strategy
references. But it did so in lazy_scan_heap()'s main loop, meaning it
looped through all the ReadBuffersOperations once per block after
failsafe was engaged. Track it with a local flag and clear the strategy
only once.

Reported-by: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAAKRu_Zse14nSNeCgtnE1LUAH8Of7OmYR%2BCc3O_DAzxt3m6T-g%40mail.gmail.com
Backpatch-through: 18

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/69800557ca32c493853b937916789f0f3da88efe

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Melanie Plageman 2026-08-07 14:06:14 pgsql: Only clear VACUUM's read stream strategy once in failsafe mode
Previous Message Amit Langote 2026-08-07 08:48:17 pgsql: Add previous commit to .git-blame-ignore-revs