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: Refactor and improve tests of pg_walinspect
Date: Mon, 13 Mar 2023 04:05:04 +0000
Message-ID: <E1pbZQm-003Gxk-Cp@gemulon.postgresql.org> (raw)

Refactor and improve tests of pg_walinspect

The regression tests of pg_walinspect are reworked on a few aspects:
- Reorganization on the validation checks done for the start and end
LSNs on the six SQL functions currently available in 1.1.
- Addition of a few patterns doing bound checks for invalid start LSN,
invalid end LSN, and failures in reading LSN positions, for anything
that's been missing.
- Use of a consistent style across the whole, limiting blank lines
across the queries.
- Addition of a new test script for upgrades.  For the time being, this
is straight-forward with a check that the upgrade from 1.0 works
correctly.  This will be made more complicated once the interface of
this extension is reworked in 1.1 with a follow-up patch.

Most of the contents of this commit are extracted from a larger patch by
the same author, largely reorganized by me to minimize the differences
with the upcoming work aimed to lift the bound checks on the input LSNs
used by the functions of this extension.

Author: Bharath Rupireddy, Michael Paquier
Discussion: https://postgr.es/m/CALj2ACU0_q-o4DSweyaW9NO1KBx-QkN6G_OzYQvpjf3CZVASkg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1f282c24e464d8b2647b86bf465e04cc540404f6

Modified Files
--------------
contrib/pg_walinspect/Makefile                    |  2 +-
contrib/pg_walinspect/expected/oldextversions.out | 30 +++++++++++
contrib/pg_walinspect/expected/pg_walinspect.out  | 54 ++++++++++++++++++--
contrib/pg_walinspect/meson.build                 |  1 +
contrib/pg_walinspect/sql/oldextversions.sql      | 14 ++++++
contrib/pg_walinspect/sql/pg_walinspect.sql       | 61 ++++++++++++-----------
6 files changed, 128 insertions(+), 34 deletions(-)



Message-ID: <E1pbZQm-003Gxk-Cp@gemulon.postgresql.org>
Permalink:  ../E1pbZQm-003Gxk-Cp@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pbZQm-003Gxk-Cp@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: Refactor and improve tests of pg_walinspect
  In-Reply-To: <E1pbZQm-003Gxk-Cp@gemulon.postgresql.org>
  References: <E1pbZQm-003Gxk-Cp@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