From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru>, 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:56:36 |
Message-ID: | 20200326215636.GA18768@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2020-Mar-26, Michael Paquier wrote:
> 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.
Uh, is XLOGDIR the only reason to include xlog_internal.h? Maybe it
would be easier to have a routine in xlog.c that returns the path?
There's a few functions in xlog.c that could use it, as well.
Altough ... looking at xlog.h, that one is even worse, so I'm not sure
*where* you'd put the prototype for the new function I'm proposing.
> 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.
The patch downthread looks decent cleanup, but I'm not sure how it helps
further the objective.
(A really good cleanup could be a situation where frontend files don't
need xlog_internal.h -- for example, maybe a new file xlogpage.h could
contain struct defs that relate to page and segment headers and the
like, as well as useful macros. I don't know if this can be made to
work -- but xlog_internal.h contains stuff like xl_parameter_change etc
as well as RmgrData which surely are of no interest to readers of wal
files ... or, say, RequestXLogSwitch.)
I don't think any such cleanup should hamper the patch at hand anyway.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2020-03-26 22:17:52 | Re: error context for vacuum to include block number |
Previous Message | Fabien COELHO | 2020-03-26 21:35:03 | Re: pgbench - add \aset to store results of a combined query |