Re: Resetting recovery target parameters in pg_createsubscriber
Andrey Rudometov <unlimitedhikari@gmail.com>
From: Andrey Rudometov <unlimitedhikari@gmail.com>
To: Alena Vinter <dlaaren8@gmail.com>
Cc: Alexander Korotkov <aekorotkov@gmail.com>,
Robert Haas <robertmhaas@gmail.com>, Michael Paquier <michael@paquier.xyz>, Ilyasov Ian <ianilyasov@outlook.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-12-13T05:07:35Z
Lists: pgsql-hackers
Attachments
- v1-0001-Change-createsubscriber-s-durable_rename-to-fe.patch (text/x-patch)
Hello Alena! While reading through your patch, i noticed backend's include of +#include "storage/fd.h" which, as I understand, is needed for +err = durable_rename(filename_with_original_contents, filename, ERROR); +durable_rename(filename, filename_with_original_contents, FATAL); Postgres' source code actually has two different durable_rename signatures - one for frontend, and one for backend. As pg_createsubscriber uses frontend definitions, I suggest replacing this durable_rename with one from common/file_utils.h. 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. -- best regards, Andrey Rudometov