pgsql: Save a few cycles during nbtree VACUUM.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Save a few cycles during nbtree VACUUM.
Date: 2021-03-11 22:19:02
Message-ID: E1lKTe2-00060l-J8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Save a few cycles during nbtree VACUUM.

Avoid calling RelationGetNumberOfBlocks() unnecessarily in the common
case where there are no deleted but not yet recycled pages to recycle
during a cleanup-only nbtree VACUUM operation.

Follow-up to commit e5d8a999, which (among other things) taught the
"skip full scan" nbtree VACUUM mechanism to only trigger a full index
scan when the absolute number of deleted pages in the index is
considered excessive.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7bb97211a5589265f3f88183ae9353639ab184c6

Modified Files
--------------
src/backend/access/nbtree/nbtree.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2021-03-12 02:36:43 pgsql: Minor modernization for README.barrier.
Previous Message Alvaro Herrera 2021-03-11 21:47:49 Re: pgsql: Don't consider newly inserted tuples in nbtree VACUUM.