Re: Resetting recovery target parameters in pg_createsubscriber

Поиск
Список
Период
Сортировка
От Andrey Rudometov
Тема Re: Resetting recovery target parameters in pg_createsubscriber
Дата
Msg-id CAF6JsWii_yNsmjzu4W=f+LF=ZpENt5FwZ3wup-k6Evd+4NX02w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Resetting recovery target parameters in pg_createsubscriber  (Alena Vinter <dlaaren8@gmail.com>)
Список pgsql-hackers
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

Вложения

В списке pgsql-hackers по дате отправления: