pgsql: Use scanned_pages to decide when to failsafe check.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use scanned_pages to decide when to failsafe check.
Date: 2022-12-22 18:43:42
Message-ID: E1p8QXd-004ucD-EM@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use scanned_pages to decide when to failsafe check.

Perform a failsafe check every time VACUUM's first heap scan scans a
further FAILSAFE_EVERY_PAGES pages, rather than using an approach based
on the number of physical blocks that our current blkno is from the
blkno at the time of the previous failsafe check. That way VACUUM will
perform a failsafe check every time it has scanned a uniform number of
pages, without it mattering when or how VACUUM skipped pages using the
visibility map.

Sami Imseih, with changes to FAILSAFE_EVERY_PAGES comments added by me.

Author: Sami Imseih <simseih(at)amazon(dot)com>
Reviewed-By: Peter Geoghegan <pg(at)bowt(dot)ie>
Discussion: https://postgr.es/m/401CE010-4049-4B94-9961-0B610A5D254D%40amazon.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/07eef53955ea9885dd3e4701b7eaa34ccdf2ae02

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

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2022-12-22 22:06:42 pgsql: Improve notation of cacheinfo table in syscache.c.
Previous Message Peter Geoghegan 2022-12-22 17:39:11 pgsql: Refactor how VACUUM passes around its XID cutoffs.