Обсуждение: pgsql: Add test module for SLRUs

Поиск
Список
Период
Сортировка

pgsql: Add test module for SLRUs

От
Michael Paquier
Дата:
Add test module for SLRUs

This commit introduces a basic facility to test SLRUs, in terms of
initialization, page reads, writes, flushes, truncation and deletions,
using SQL wrappers around the APIs of slru.c.  This should be easily
extensible at will, and it can be used as a starting point for someone
willing to implement an external module that makes use of SLRUs (LWLock
tranche registering and SLRU initialization particularly).

As this requires a loaded library, the tests use a custom configuration
file and are disabled under installcheck.

Author: Aleksander Alekseev, Michael Paquier
Reviewed-by: Pavel Borisov, Daniel Gustafsson, Noah Misch, Maxim Orlov
Discussion: https://postgr.es/m/CAJ7c6TOFoWcHOW4BVe3BG_uikCrO9B91ayx9d6rh5JZr_tPESg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/006b69fd912b8fa0e9d80df3f61829a5c976c3d3

Modified Files
--------------
src/test/modules/Makefile                         |   1 +
src/test/modules/meson.build                      |   1 +
src/test/modules/test_slru/.gitignore             |   4 +
src/test/modules/test_slru/Makefile               |  27 +++
src/test/modules/test_slru/expected/test_slru.out | 135 ++++++++++++
src/test/modules/test_slru/meson.build            |  35 +++
src/test/modules/test_slru/sql/test_slru.sql      |  38 ++++
src/test/modules/test_slru/test_slru--1.0.sql     |  21 ++
src/test/modules/test_slru/test_slru.c            | 257 ++++++++++++++++++++++
src/test/modules/test_slru/test_slru.conf         |   1 +
src/test/modules/test_slru/test_slru.control      |   4 +
11 files changed, 524 insertions(+)