]> granicus.if.org Git - postgresql/commit
Use callbacks in SlruScanDirectory for the actual action
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 28 Sep 2011 14:32:38 +0000 (11:32 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 4 Oct 2011 17:03:23 +0000 (14:03 -0300)
commit09e196e4539a70c51e828abcfe48dee3efd312d8
treea229e227e0e4db185606acafbbd3e8c3c12171aa
parent1a00c0ef5368bb7b8ddcb3cf279df36577918ac4
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.
src/backend/access/transam/clog.c
src/backend/access/transam/slru.c
src/backend/commands/async.c
src/include/access/slru.h