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-01-18T02:29:20Z
Lists: 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
Commits
-
Redesign archive modules
- 35739b87dcfe 16.0 landed
-
Remove uses of AssertVariableIsOfType() obsoleted by f2b73c8
- 30b789eafed2 16.0 landed
-
Rename contrib module basic_archive to basic_wal_module
- 0ad3c60caf5f 16.0 landed
-
Refactor code for restoring files via shell commands
- 14bdb3f13de1 16.0 landed
-
Refactor code in charge of running shell-based recovery commands
- 9a740f81eb02 16.0 landed