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 20200327073715.GB1486@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>)
List pgsql-hackers
On Fri, Mar 27, 2020 at 12:24:19AM +0300, Alexey Kondratov wrote:
> The block of function declarations for xlogarchive.c inside xlog_internal.h
> looks a bit dangling already, since all other functions and variables
> defined/initialized in xlog.c. That way, it looks good to me to move it
> outside.

Yep, exactly my point of view.

> The only one concern about using the same name I have is that later someone
> may introduce a new variable or typedef inside xlogarchive.h. So someone
> else would be required to include both fe_archive.h and xlogarchive.h at
> once. But probably there should be a warning in the header comment section
> against doing so.
>
> Anyway, I have tried to do what you proposed and attached is a small patch,
> that introduces xlogarchive.h.

Thanks for sending a patch, that's the split I would have done.

+#include "access/xlogdefs.h"
Oh, I see.  You need that in xlogarchive.h for XLogSegNo.  Makes sense.

+ * xlogarchive.h
+ *     Prototypes of functions for archiving WAL files and restoring
+ *     from the archive.
The only tweak I would have done here is to reword that as "Utilities
for interacting with WAL archives in the backend."

Alvaro, Alexander, do you like this split?  FWIW, I do as it is
simple.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Some problems of recovery conflict wait events
Next
From: Michael Paquier
Date:
Subject: Re: pg_checksums in backend/storage/page/README