pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve tests for recovery_target_timeline GUC.
Date: Fri, 06 Mar 2026 07:04:31 +0000
Message-ID: <E1vyPEd-002dcW-1w@gemulon.postgresql.org> (raw)

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@pgbackrest.org>
Reviewed-by: Fujii Masao <masao.fujii@gmail.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(-)



Message-ID: <E1vyPEd-002dcW-1w@gemulon.postgresql.org>
Permalink:  ../E1vyPEd-002dcW-1w@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vyPEd-002dcW-1w@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Improve tests for recovery_target_timeline GUC.
  In-Reply-To: <E1vyPEd-002dcW-1w@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