| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Andrey Rudometov <unlimitedhikari(at)gmail(dot)com> |
| Cc: | Alena Vinter <dlaaren8(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Ilyasov Ian <ianilyasov(at)outlook(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Resetting recovery target parameters in pg_createsubscriber |
| Date: | 2025-12-17 04:10:35 |
| Message-ID: | aUItOwhwx8YEtAzp@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, Dec 13, 2025 at 12:07:35PM +0700, Andrey Rudometov wrote:
> A patch with my approach to replacement is in attachments
> (to be applied after yours).
>
> p.s. I wonder why this builds at all - as far as I have tried, using
> BE in FE usually leads to a ton of compilation errors or, at least,
> warnings treated as errors - p.e, in this case backend definition
> uses ereport(), which does not work in frontend utilities.
Yep, that's indeed something that the patch should not do at all.
> - durable_rename(filename, filename_with_original_contents, FATAL);
> + err = durable_rename(filename, filename_with_original_contents);
> + if (err)
> + pg_fatal("could not rename file \"%s\"", filename);
I don't see a point in re-emitting an error message as well as you are
suggesting here. durable_rename() does this job already on failure
with a set of pg_log_error(). The only difference is that pg_fatal()
is a shortcut for pg_log_error()+exit().
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2025-12-17 04:19:11 | Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring |
| Previous Message | Dilip Kumar | 2025-12-17 03:49:57 | Re: Replace is_publishable_class() with relispublishable column in pg_class |