pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add test module for SLRUs
Date: Wed, 16 Nov 2022 00:54:16 +0000
Message-ID: <E1ov6gx-000NiW-A5@gemulon.postgresql.org> (raw)

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



Message-ID: <E1ov6gx-000NiW-A5@gemulon.postgresql.org>
Permalink:  ../E1ov6gx-000NiW-A5@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ov6gx-000NiW-A5@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Add test module for SLRUs
  In-Reply-To: <E1ov6gx-000NiW-A5@gemulon.postgresql.org>
  References: <E1ov6gx-000NiW-A5@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox