| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | JoongHyuk Shin <sjh910805(at)gmail(dot)com> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] Don't call ereport(ERROR) from recovery target GUC assign hooks |
| Date: | 2026-07-17 09:30:14 |
| Message-ID: | CAHGQGwEpfE0CDUUODjBt7GO9U4ZF11hqga_Ci3wP8=O49oFKVw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Jul 12, 2026 at 7:45 PM JoongHyuk Shin <sjh910805(at)gmail(dot)com> wrote:
>
> On Wed, Jul 8, 2026 at 10:39 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> > We can remove assign_recovery_target_name()?
>
> Yes, done in v9. recovery_target_name now stores directly into
> recoveryTargetName, so recovery_target_name_string and the assign hook
> are both gone.
Thanks for updating the patch!
I've updated it further. Could you review this version?
+ my $res = run_log(
+ [
+ 'pg_ctl',
+ '--pgdata' => $node_standby->data_dir,
+ '--log' => $node_standby->logfile,
+ '--options' => $options,
+ 'start',
+ ]);
+ ok($res, "server starts for $test_name");
Starting a test node with pg_ctl directly bypasses Cluster.pm's PID tracking.
As a result, cleanup via stop(), teardown_node(), etc. may not work correctly,
and the postmaster can be left running if the test fails or exits unexpectedly.
To avoid that, I added a preliminary patch that allows
PostgreSQL::Test::Cluster::start() to pass extra postmaster options through
pg_ctl --options, and then updated the test to use that start().
+sub test_recovery_standby_with_options
+{
I merged test_recovery_standby_with_options() into the existing
test_recovery_standby() by adding an optional options parameter. This removes
duplicated standby setup, catch-up waiting, row-count checks, and teardown code.
Regards,
--
Fujii Masao
| Attachment | Content-Type | Size |
|---|---|---|
| v10-0002-Avoid-ERROR-in-recovery-target-GUC-assign-hooks.patch | application/octet-stream | 19.5 KB |
| v10-0001-Allow-extra-postmaster-options-in-test-node-star.patch | application/octet-stream | 1.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nazir Bilal Yavuz | 2026-07-17 09:41:04 | Re: ci: namespace ccache by PostgreSQL major version |
| Previous Message | Chao Li | 2026-07-17 09:22:22 | pg_plan_advice: fix parsing underscore in numbers |