Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
| От | Alexander Korotkov |
|---|---|
| Тема | Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line |
| Дата | |
| Msg-id | CAPpHfdvA0Oy+a0vzcNh-sxFaBXKWnQj-TjNpnOYyhogfO+mE4A@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line (Alexey Kondratov <a.kondratov@postgrespro.ru>) |
| Ответы |
Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
|
| Список | pgsql-hackers |
On Wed, Feb 26, 2020 at 11:45 PM Alexey Kondratov
<a.kondratov@postgrespro.ru> wrote:
> On 2020-02-26 22:03, Alexander Korotkov wrote:
> > On Tue, Feb 25, 2020 at 1:48 PM Alexander Korotkov
> > <a.korotkov@postgrespro.ru> wrote:
> >>
> >> I think usage of chmod() deserves comment. As I get default
> >> permissions are sufficient for work, but we need to set them to
> >> satisfy 'check PGDATA permissions' test.
> >
> >
> > I've added this comment myself.
> >
>
> Thanks for doing it yourself, I was going to answer tonight, but it
> would be obviously too late.
>
> >
> > I've also fixes some indentation.
> > Patch now looks good to me. I'm going to push it if no objections.
> >
>
> I think that docs should be corrected. Previously Michael was against
> the phrase 'restore_command defined in the postgresql.conf', since it
> also could be defined in any config file included there. We corrected it
> in the pg_rewind --help output, but now docs say:
>
> + Use the <varname>restore_command</varname> defined in
> + <filename>postgresql.conf</filename> to retrieve WAL files from
> + the WAL archive if these files are no longer available in the
> + <filename>pg_wal</filename> directory of the target cluster.
>
> Probably it should be something like:
>
> + Use the <varname>restore_command</varname> defined in
> + the target cluster configuration to retrieve WAL files from
> + the WAL archive if these files are no longer available in the
> + <filename>pg_wal</filename> directory.
>
> Here the only text split changed:
>
> - * Ignore restore_command when not in archive recovery (meaning
> - * we are in crash recovery).
> + * Ignore restore_command when not in archive recovery (meaning we are
> in
> + * crash recovery).
>
> Should we do so in this patch?
>
> I think that this extra dot at the end is not necessary here:
>
> + pg_log_debug("using config variable restore_command=\'%s\'.",
> restore_command);
>
> If you agree then attached is a patch with all the corrections above.
Thank you! I'll push the v17 version of patch.
Regarding text split change, it was made by pgindent. I didn't notice
it belongs to unchanged part of code. Sure, we shouldn't include this
into the patch.
> It is made with default git format-patch format, but yours were in a
> slightly different format, so I only was able to apply them with git am
> --patch-format=stgit.
I made this patch using 'git show'. Yes, it would be better if I use
'git format-patch' instead. Thank you for noticing.
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
В списке pgsql-hackers по дате отправления: