pgsql: Improve tests for recovery_target_timeline GUC.

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve tests for recovery_target_timeline GUC.
Date: 2026-03-06 07:04:31
Message-ID: E1vyPEd-002dcW-1w@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve tests for recovery_target_timeline GUC.

Commit fd7d7b71913 added regression tests to verify recovery_target_timeline
settings. To confirm that invalid values are rejected, those tests started the
server with an invalid setting and then verified that startup failed. While
functionally correct, this approach was expensive because it required
setting up and starting the server for each test case.

This commit updates the tests for recovery_target_timeline to use
the simpler approach introduced by commit bffd7130 for recovery_target_xid,
using ALTER SYSTEM SET to verify that invalid settings are rejected.
This avoids the need to set up and start the server when checking invalid
recovery_target_timeline values.

Author: David Steele <david(at)pgbackrest(dot)org>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAHGQGwG44vZbSoBmg076G+xkR6n=Tj2=q+fVkfP7yEsyF1daFA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2007df43332b7c4d153bcd2153e32d5a76f7e3ac

Modified Files
--------------
src/test/recovery/t/003_recovery_targets.pl | 68 +++++++++--------------------
1 file changed, 20 insertions(+), 48 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2026-03-06 07:46:06 pgsql: Fix publisher shutdown hang caused by logical walsender busy loo
Previous Message Michael Paquier 2026-03-06 06:05:22 pgsql: Fix inconsistency with HeapTuple freeing in extended_stats_funcs