From: | Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
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-26 21:24:19 |
Message-ID: | [email protected] |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2020-03-26 10:34, Michael Paquier wrote:
> On Tue, Mar 24, 2020 at 12:22:16PM +0900, Michael Paquier wrote:
>> Thanks Alvaro and Alexander. 0001 has been applied as of e09ad07.
>> Now for 0002, let's see about it later. Attached is a rebased
>> version, with no actual changes.
>
> I was looking at this patch again today and I am rather fine with the
> existing semantics. Still I don't like much to name the frontend-side
> routine FrontendRestoreArchivedFile() and use a different name than
> the backend counterpart because we have to include xlog_internal.h in
> fe_archive.c to be able to grab XLOGDIR.
>
> So here is an idea: let's move the declaration of the routines part of
> xlogarchive.c to a new header, called xlogarchive.h, and then let's
> use the same routine name for the frontend and the backend in this
> second patch. We include xlog_internal.h already in many frontend
> tools, so that would clean up things a bit. Two extra things are the
> routines for the checkpointer as well as the variables like
> ArchiveRecoveryRequested. It may be nice to move those while on it,
> but I am not sure where and that's not actually required for this
> patch set so that could be addressed later if need be.
>
> Any thoughts?
>
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.
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.
Regards
--
Alexey Kondratov
Postgres Professional https://www.postgrespro.com
Russian Postgres Company
Attachment | Content-Type | Size |
---|---|---|
introduce_xlogarchive_h.diff | text/x-diff | 4.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2020-03-26 21:35:03 | Re: pgbench - add \aset to store results of a combined query |
Previous Message | David Rowley | 2020-03-26 21:18:40 | Re: Berserk Autovacuum (let's save next Mandrill) |