Re: Resetting recovery target parameters in pg_createsubscriber

Поиск
Список
Период
Сортировка
От Alena Vinter
Тема Re: Resetting recovery target parameters in pg_createsubscriber
Дата
Msg-id CAGWv16LPtKym0kBW-hsYe7XMm9j1+1ap0jga+QarW4Ku1oV13g@mail.gmail.com
обсуждение исходный текст
Ответ на RE: Resetting recovery target parameters in pg_createsubscriber  (Ilyasov Ian <ianilyasov@outlook.com>)
Ответы Re: Resetting recovery target parameters in pg_createsubscriber
Список pgsql-hackers
Hi everyone,

Thank you for all the valuable feedback! I've improved the patches in the latest version.


> Based on the contents of the latest patch, we reset the parameters
> after promoting the node, and primary_conninfo only matters while we
> are in recovery, for a standby recovery WAL using the streaming
> replication protocol.

Michael, thanks for helping! This fact simplifies the code. I put resetting the parameters exclusively in the `atexit` callback -- this approach seems neater to me. What do you think?


> Did I get the idea right?

Ian, yes, you got it right. The core issue occurs when postgres encounters a checkpoint during recovery, determines redo isn't needed (because there are no records after the checkpoint), but then fails with a fatal error because it cannot reach the specified LSN target (which is lower than the checkpoint LSN). I reckon this is a recovery logic issue, but I also believe the component that sets recovery parameters should be responsible for cleaning them up when they're no longer required.


Best wishes,
Alena Vinter
Вложения

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