Use callbacks in SlruScanDirectory for the actual action
Alvaro Herrera <alvherre@alvh.no-ip.org>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/clog.c | modified | +1 −1 |
| src/backend/access/transam/slru.c | modified | +76 −28 |
| src/backend/commands/async.c | modified | +7 −29 |
| src/include/access/slru.h | modified | +10 −1 |