[PATCH] introduce XLogLockBlockRangeForCleanup() - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject [PATCH] introduce XLogLockBlockRangeForCleanup()
Date
Msg-id 20140613084012.GA16567@toroid.org
Whole thread Raw
Responses Re: [PATCH] introduce XLogLockBlockRangeForCleanup()  (Amit Khandekar <amit.khandekar@enterprisedb.com>)
List pgsql-hackers
nbtxlog.c:btree_xlog_vacuum() contains the following comment:

     * XXX we don't actually need to read the block, we just need to
     * confirm it is unpinned. If we had a special call into the
     * buffer manager we could optimise this so that if the block is
     * not in shared_buffers we confirm it as unpinned.

The attached patch introduces an XLogLockBlockRangeForCleanup() function
that addresses this, as well as a "special call into the buffer manager"
that makes it possible to lock the buffers without reading them.

The patch is by Simon Riggs, with some minor edits and testing by me.

I'm adding the patch to the CommitFest, and will follow up with some
performance numbers soon.

-- Abhijit

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: PL/pgSQL support to define multi variables once
Next
From: Amit Kapila
Date:
Subject: Re: Few observations in replication slots related code