pgsql: Use callbacks in SlruScanDirectory for the actual action

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Use callbacks in SlruScanDirectory for the actual action
Дата
Msg-id E1RB8W7-0007lz-Ug@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Remove the custom_variable_classes parameter.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Remember the source GucContext for each GUC parameter.