pgsql: Add test module for SLRUs

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add test module for SLRUs
Date: 2022-11-16 00:54:16
Message-ID: E1ov6gx-000NiW-A5@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-11-16 01:50:53 pgsql: Avoid some overhead with open and close of catalog indexes
Previous Message Jeff Davis 2022-11-16 00:27:55 pgsql: Mark argument of RegisterCustomRmgr() as const.