pgsql: Add basic TAP tests for the low-level backup method

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add basic TAP tests for the low-level backup method
Date: 2024-03-14 01:57:17
Message-ID: E1rkaLM-003gu9-Kq@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add basic TAP tests for the low-level backup method

There are currently no tests for the low-level backup method where
pg_backup_start() and pg_backup_stop() are involved while taking a
file-system backup. The tests introduced in this commit rely on a
background psql process to make sure that the backup is taken while the
session doing the SQL start and stop calls remains alive.

Two cases are checked here with the backup taken:
- Recovery without a backup_label, leading to a corrupted state.
- Recovery with a backup_label, with a consistent state reached.
Both cases cross-check some patterns in the logs generated when running
recovery.

Author: David Steele
Discussion: https://postgr.es/m/f20fcc82-dadb-478d-beb4-1e2ffb0ace76@pgmasters.net

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/99b4a63bef94b8e62a9a96c2446d1c16f95acd3b

Modified Files
--------------
src/test/recovery/t/042_low_level_backup.pl | 120 ++++++++++++++++++++++++++++
1 file changed, 120 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2024-03-14 04:27:13 pgsql: Revert "Add basic TAP tests for the low-level backup method"
Previous Message Alexander Korotkov 2024-03-14 00:18:17 pgsql: Improve documentation for pg_stat_checkpointer fields