pgsql: Add some tests to check the SQL functions of control file - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Add some tests to check the SQL functions of control file
Date
Msg-id E1onrEj-000xeY-G5@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(+)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Fix unlink() for STATUS_DELETE_PENDING on Windows.
Next
From: Michael Paquier
Date:
Subject: pgsql: Move pg_pwritev_with_retry() to src/common/file_utils.c