Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
Date
Msg-id 20200306012120.GD52814@paquier.xyz
Whole thread Raw
In response to Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line  (Alexey Kondratov <a.kondratov@postgrespro.ru>)
Responses Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
List pgsql-hackers
On Thu, Mar 05, 2020 at 07:52:24PM +0300, Alexey Kondratov wrote:
> OK, I was still having in mind pg_rewind as the only one user of this
> routine. Now it is a part of the common and I could imagine a hypothetical
> tool that is polling the archive and waiting for a specific WAL segment to
> become available. In this case 'command not found' is definitely the end of
> game, while the absence of segment is expected error, so we can continue
> looping.

Depending on the needs, we could also add in the future an option in
this API to not exit if the command is missing.  Who knows if a case
can be made..

By the way, as a matter of transparency, I have discussed this patch
with Alexander offlist and he has pinged me that I may be in a better
place to commit it per the amount of review I have done, so I'll try
to handle it.  I was also thinking to split the patch into two pieces:
- Introduction of common/archive.c and common/fe_archive.c (the former
is used by xlogarchive.c and the latter only by pg_rewind).  The
latter is dead code without the second patch, but this would validate
the MSVC build with the buildfarm.
- The pg_rewind pieces with the new option.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Psql patch to show access methods info
Next
From: Bruce Momjian
Date:
Subject: Re: Do we need to handle orphaned prepared transactions in theserver?