| From: | David Steele <david(at)pgbackrest(dot)org> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Hüseyin Demir <huseyin(dot)d3r(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Improve checks for GUC recovery_target_xid |
| Date: | 2026-03-05 04:21:16 |
| Message-ID: | e6a27751-8c91-4bff-ba07-2e97de99e34f@pgbackrest.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 3/5/26 11:03, Michael Paquier wrote:
> On Thu, Mar 05, 2026 at 03:40:44AM +0000, David Steele wrote:
>> I wrote the tests for recovery_target_timeline but I was not too satisfied
>> with them because starting Postgres is fairly expensive.
>
> +# Invalid recovery_target_xid tests
> +$node_standby = PostgreSQL::Test::Cluster->new('standby_10');
> +$node_standby->init_from_backup($node_primary, 'my_backup',
> + has_restoring => 1);
> +$node_standby->start;
> +
> +my ($result, $stdout, $stderr) = $node_primary->psql('postgres',
> + "ALTER SYSTEM SET recovery_target_xid TO 'bogus'");
> +like(
> + $stderr,
> + qr/is not a valid number/,
> + "invalid recovery_target_xid (bogus value)");
>
> Smart move to rely on ALTER SYSTEM to check how the GUC callback is
> reacting on incorrect input values. Why do you need to create and
> start a new standby if it is not used, then?
The prior standby is not running because of the invalid config. I
figured it was better to start clean but when I update the
recovery_target_timeline tests I was planning to use the same standby
for all the new tests.
Regards,
-David
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hayato Kuroda (Fujitsu) | 2026-03-05 04:29:59 | RE: BUG: Former primary node might stuck when started as a standby |
| Previous Message | 장성준 | 2026-03-05 04:16:21 | Re: Row pattern recognition |