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 some tests to check the SQL functions of control file
Date: Thu, 27 Oct 2022 00:59:10 +0000
Message-ID: <E1onrEj-000xeY-G5@gemulon.postgresql.org> (raw)

Add some tests to check the SQL functions of control file

As the recent commit 05d4cbf (reverted after as a448e49) has proved,
there is zero coverage for the four SQL functions that can scan the
control file data:
- pg_control_checkpoint()
- pg_control_init()
- pg_control_recovery()
- pg_control_system()

This commit adds a minimal coverage for these functions, checking that
their execution is able to complete.  This would have been enough to
catch the problems introduced in the commit mentioned above.  More
checks could be done for each individual fields, but it is unclear
whether this would be better than the other checks in place in the
backend code.

Per discussion with Bharath Rupireddy.

Discussion: https://postgr.es/m/Y1d2FZmQmyAhPSRG@paquier.xyz

Branch
------
master

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

Modified Files
--------------
src/test/regress/expected/misc_functions.out | 25 +++++++++++++++++++++++++
src/test/regress/sql/misc_functions.sql      |  6 ++++++
2 files changed, 31 insertions(+)



Message-ID: <E1onrEj-000xeY-G5@gemulon.postgresql.org>
Permalink:  ../E1onrEj-000xeY-G5@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1onrEj-000xeY-G5@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 some tests to check the SQL functions of control file
  In-Reply-To: <E1onrEj-000xeY-G5@gemulon.postgresql.org>
  References: <E1onrEj-000xeY-G5@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