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