Re: recovery modules

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org
Date: 2023-02-04T02:59:20Z
Lists: pgsql-hackers
On Thu, Feb 02, 2023 at 11:37:00AM -0800, Nathan Bossart wrote:
> On Thu, Feb 02, 2023 at 02:34:17PM +0900, Michael Paquier wrote:
>> Okay, the changes done here look straight-forward seen from here.  I
>> got one small-ish comment.
>> 
>> +basic_archive_startup(ArchiveModuleState *state)
>> +{
>> +   BasicArchiveData *data = palloc0(sizeof(BasicArchiveData));
>> 
>> Perhaps this should use MemoryContextAlloc() rather than a plain
>> palloc().  This should not matter based on the position where the
>> startup callback is called, still that may be a pattern worth
>> encouraging.
> 
> Good call.

+   ArchiveModuleCallbacks struct filled with the callback function pointers for
This needs a structname markup.

+   can use <literal>state->private_data</literal> to store it.
And here it would be structfield.

As far as I can see, all the points raised about this redesign seem to
have been addressed.  Andres, any comments?
--
Michael

Commits

  1. Redesign archive modules

  2. Remove uses of AssertVariableIsOfType() obsoleted by f2b73c8

  3. Rename contrib module basic_archive to basic_wal_module

  4. Refactor code for restoring files via shell commands

  5. Refactor code in charge of running shell-based recovery commands