pgsql: Use callbacks in SlruScanDirectory for the actual action

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use callbacks in SlruScanDirectory for the actual action
Date: 2011-10-04 17:10:55
Message-ID: E1RB8W7-0007lz-Ug@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use callbacks in SlruScanDirectory for the actual action

Previously, the code assumed that the only possible action to take was
to delete files behind a certain cutoff point. The async notify code
was already a crock: it used a different "pagePrecedes" function for
truncation than for regular operation. By allowing it to pass a
callback to SlruScanDirectory it can do cleanly exactly what it needs to
do.

The clog.c code also had its own use for SlruScanDirectory, which is
made a bit simpler with this.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/09e196e4539a70c51e828abcfe48dee3efd312d8

Modified Files
--------------
src/backend/access/transam/clog.c | 2 +-
src/backend/access/transam/slru.c | 104 +++++++++++++++++++++++++++----------
src/backend/commands/async.c | 36 +++----------
src/include/access/slru.h | 11 ++++-
4 files changed, 94 insertions(+), 59 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alex Hunsaker 2011-10-04 17:27:32 Re: Re: [COMMITTERS] pgsql: Force strings passed to and from plperl to be in UTF8 encoding.
Previous Message Tom Lane 2011-10-04 16:37:28 pgsql: Remove the custom_variable_classes parameter.