pgsql: Add some tests to check the SQL functions of control file

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Add some tests to check the SQL functions of control file
Дата
Msg-id E1onrEj-000xeY-G5@gemulon.postgresql.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: Fix unlink() for STATUS_DELETE_PENDING on Windows.
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Move pg_pwritev_with_retry() to src/common/file_utils.c