Re: Weird failure with latches in curculio on v15
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Michael Paquier <michael@paquier.xyz>, Tom Lane <tgl@sss.pgh.pa.us>, Thomas Munro <thomas.munro@gmail.com>, Fujii Masao <fujii@postgresql.org>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-02-08T15:22:24Z
Lists: pgsql-hackers
On Sun, Feb 5, 2023 at 7:46 PM Nathan Bossart <nathandbossart@gmail.com> wrote: > Got it. I suspect we'll want to do something similar for archive modules > eventually, too. +1. I felt like the archive modules work was a step forward when we did, because basic_archive does some things that you're not likely to get right if you do it on your own. And a similar approach to restore_command might be also be valuable, at least in my opinion. However, the gains that we can get out of the archive module facility in its present form do seem to be somewhat limited, for exactly the kinds of reasons being discussed here. I kind of wonder whether we ought to try to flip the model around. At present, the idea is that the archiver is doing its thing and it makes callbacks into the archive module. But what if we got rid of the archiver main loop altogether and put the main loop inside of the archive module, and have it call back to some functions that we provide? One function could be like char *pgarch_next_file_to_be_archived_if_there_is_one_ready(void) and the other could be like void pgarch_some_file_that_you_gave_me_previously_is_now_fully_archived(char *which_one). That way, we'd break the tight coupling where you have to get a unit of work and perform it in full before you can get the next unit of work. Some variant of this could work on the restore side, too, I think, although we have less certainty about how much it makes to prefetch for restore than we do about what needs to be archived. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
-
Avoid calling proc_exit() in processes forked by system().
- d0e7f95b4845 11.22 landed
- e2e16904224a 12.17 landed
- ac1dfc303d0e 13.13 landed
- 54fc9dca5b10 14.10 landed
- c9265ae80b6a 15.5 landed
- ee06199fcb0a 16.1 landed
- 97550c071197 17.0 landed
-
Move extra code out of the Pre/PostRestoreCommand() section.
- 882e522d6468 15.5 landed
- d1c56ad37b96 16.1 landed
- 8fb13dd6ab5b 17.0 landed
-
Revert refactoring of restore command code to shell_restore.c
- 2f6e15ac93c5 16.0 landed
-
Refactor code in charge of running shell-based recovery commands
- 9a740f81eb02 16.0 cited
-
Clean up inconsistent use of fflush().
- 7fed801135ba 16.0 cited
-
Report wait events for local shell commands like archive_command.
- 1b06d7bac901 15.0 cited