Re: pg_rewind restore_command issue in PG12

From: Amine Tengilimoglu <aminetengilimoglu(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_rewind restore_command issue in PG12
Date: 2021-01-05 08:54:42
Message-ID: CADTdw-yJ8xa_cMR_Zp5QgE=KHwFvMCx=cR-Qmv1O8JNTtqaXzA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you Michael. I agree with you. Relevant part can be removed from the
document and eliminate the confusion at least.

Michael Paquier <michael(at)paquier(dot)xyz>, 5 Oca 2021 Sal, 10:17 tarihinde şunu
yazdı:

> On Mon, Jan 04, 2021 at 04:12:34PM +0300, Amine Tengilimoglu wrote:
> > When I read the pg_rewind PG12 doc. It says:
> >
> > "... but if the target cluster ran for a long time after the divergence,
> > the old WAL files might no longer be present. In that case, they can be
> > manually copied from the WAL archive to the pg_wal directory,* or fetched
> > on startup by configuring **primary_conninfo
> > <
> https://www.postgresql.org/docs/12/runtime-config-replication.html#GUC-PRIMARY-CONNINFO
> >
> > or restore_command
> > <
> https://www.postgresql.org/docs/12/runtime-config-wal.html#GUC-RESTORE-COMMAND
> >*
> > .".
> >
> > So I thought we could use restore_command. But when I try to use it , I
> > see it doesn't work either.
>
> I agree with your point that the docs of 9.6~12 are confusing here.
> It makes no sense to mention restore_command or primary_conninfo to
> fetch WAL segments for the target to allow pg_rewind to find the point
> of divergence because the target is already offline when we look at
> that. Mentioning restore_command/primary_conninfo for recovery
> purposes could make sense in the context in the follow-up paragraph
> though, where the target gets restarted, after the rewind. But the
> uses are different.
>
> The docs of 13~ got that right when -c has been introduced by
> rewording this sentence as "or run pg_rewind with the -c option to
> automatically retrieve them from the WAL archive". So let's get rid
> of ", or fetched on startup by configuring primary_conninfo or
> restore_command." ("or fetched on startup by configuring
> recovery.conf" in some older branches). This confusion has been
> introduced by 878bd9a, down to 9.6.
>
> Heikki, what do you think?
> --
> Michael
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-01-05 08:56:45 Re: pl/pgsql feature request: shorthand for argument and local variable references
Previous Message Masahiko Sawada 2021-01-05 08:45:24 Re: Disable WAL logging to speed up data loading