Re: Two pg_rewind patches (auto generate recovery conf and ensureclean shutdown)

Поиск
Список
Период
Сортировка
От Paul Guo
Тема Re: Two pg_rewind patches (auto generate recovery conf and ensureclean shutdown)
Дата
Msg-id CAEET0ZHRbn7ROSRCf-CV8Vp1QL+baTxd4=Ong1Dr7A0OuBzmyA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Two pg_rewind patches (auto generate recovery conf and ensureclean shutdown)  (Paul Guo <pguo@pivotal.io>)
Ответы Re: Two pg_rewind patches (auto generate recovery conf and ensureclean shutdown)  (Thomas Munro <thomas.munro@gmail.com>)
Re: Two pg_rewind patches (auto generate recovery conf and ensureclean shutdown)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi Michael,

I updated the patches as attached following previous discussions.

The two patches:
v2-0001-Extact-common-functions-from-pg_basebackup-into-s.patch
v2-0002-Add-option-to-write-recovery-configuration-inform.patch

1. 0001 does move those common functions & variables to two new files (one .c and one .h) for both pg_rewind and pg_basebackup use,
note the functions are slightly modified (e.g. because conn is probably NULL on pg_rewind). I do not know where is more proper to put the
new files. Currently, they are under pg_basebackup and are used in pg_rewind (Makefile modified to support that).

2. 0002 adds the option to write recovery conf.

The below patch runs single mode Postgres if needed to make sure the target is cleanly shutdown. A new option is added (off by default).
v2-0001-Ensure-target-clean-shutdown-at-beginning-of-pg_r.patch

I've manually tested them and installcheck passes.

Thanks.

On Wed, Mar 20, 2019 at 1:23 PM Paul Guo <pguo@pivotal.io> wrote:


On Wed, Mar 20, 2019 at 1:20 PM Michael Paquier <michael@paquier.xyz> wrote:
On Wed, Mar 20, 2019 at 12:48:52PM +0800, Paul Guo wrote:
> This is a good suggestion also. Will do it.

Please note also that we don't care about recovery.conf since v12 as
recovery parameters are now GUCs.  I would suggest appending those
extra parameters to postgresql.auto.conf, which is what pg_basebackup
does.
Yes, the recovery conf patch in the first email did like this, i.e. writing postgresql.auto.conf & standby.signal
 
Вложения

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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: bug in update tuple routing with foreign partitions
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Race conditions with checkpointer and shutdown