Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru>
Cc: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, Liudmila Mantrova <l(dot)mantrova(at)postgrespro(dot)ru>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, David Steele <david(at)pgmasters(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, vladimirlesk(at)yandex-team(dot)ru, dsarafan(at)yandex-team(dot)ru
Subject: Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line
Date: 2020-03-27 07:37:15
Message-ID: 20200327073715.GB1486@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-03-27 07:39:55 Re: pg_checksums in backend/storage/page/README
Previous Message Fujii Masao 2020-03-27 07:35:57 Re: Some problems of recovery conflict wait events