Re: recovery modules - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: recovery modules
Date
Msg-id Y8dZgIeqsLe6NP6B@paquier.xyz
Whole thread Raw
In response to Re: recovery modules  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: recovery modules
List pgsql-hackers
On Tue, Jan 17, 2023 at 10:23:56AM -0800, Nathan Bossart wrote:
> Yeah, this seems cleaner.  I removed BuildRestoreCommand() in v8.

        if (*sp == *lp)
        {
-           if (val)
-           {
-               appendStringInfoString(&result, val);
-               found = true;
-           }
-           /* If val is NULL, we will report an error. */
+           appendStringInfoString(&result, val);
+           found = true;

In 0002, this code block has been removed as an effect of the removal
of BuildRestoreCommand(), because RestoreArchivedFile() needs to
handle two flags with two values.  The current design has the
advantage to warn extension developers with an unexpected
manipulation, as well, so I have kept the logic in percentrepl.c
as-is.

I was wondering also if ExecuteRecoveryCommand() should use a bits32
for its two boolean flags, but did not bother as it is static in
shell_restore.c so ABI does not matter, even if there are three
callers of it with 75% of the combinations possible (only false/true
is not used).

And 0002 is applied.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Removing redundant grouping columns
Next
From: Amit Kapila
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply