postgresql/src/backend
Michael Paquier 9a740f81eb Refactor code in charge of running shell-based recovery commands
The code specific to the execution of archive_cleanup_command,
recovery_end_command and restore_command is moved to a new file named
shell_restore.c.  The code is split into three functions:
- shell_restore(), that attempts the execution of a shell-based
restore_command.
- shell_archive_cleanup(), for archive_cleanup_command.
- shell_recovery_end(), for recovery_end_command.

This introduces no functional changes, with failure patterns and logs
generated in consequence being the same as before (one case actually
generates one less DEBUG2 message "could not restore" when a restore
command succeeds but the follow-up stat() to check the size fails, but
that only matters with a elevel high enough).

This is preparatory work for allowing recovery modules, a facility
similar to archive modules, with callbacks shaped similarly to the
functions introduced here.

Author: Nathan Bossart
Reviewed-by: Andres Freund, Michael Paquier
Discussion: https://postgr.es/m/20221227192449.GA3672473@nathanxps13
2023-01-16 16:31:43 +09:00
..
access Refactor code in charge of running shell-based recovery commands 2023-01-16 16:31:43 +09:00
backup Update copyright for 2023 2023-01-02 15:00:37 -05:00
bootstrap Update copyright for 2023 2023-01-02 15:00:37 -05:00
catalog Ignore dropped and generated columns from the column list. 2023-01-13 14:49:23 +05:30
commands Fix MAINTAIN privileges for toast tables and partitions. 2023-01-14 00:16:23 -08:00
executor Make new GENERATED-expressions code more bulletproof. 2023-01-15 13:14:52 -05:00
foreign Update copyright for 2023 2023-01-02 15:00:37 -05:00
jit Fix typos in comments, code and documentation 2023-01-03 16:26:14 +09:00
lib Constify the arguments of ilist.c/h functions 2023-01-12 08:00:51 +01:00
libpq Store IdentLine->pg_user as an AuthToken 2023-01-16 13:58:07 +09:00
main Update copyright for 2023 2023-01-02 15:00:37 -05:00
nodes Revert "Get rid of the "new" and "old" entries in a view's rangetable." 2023-01-11 23:01:22 -05:00
optimizer Revert "Get rid of the "new" and "old" entries in a view's rangetable." 2023-01-11 23:01:22 -05:00
parser Revert "Get rid of the "new" and "old" entries in a view's rangetable." 2023-01-11 23:01:22 -05:00
partitioning Update copyright for 2023 2023-01-02 15:00:37 -05:00
po Update copyright for 2023 2023-01-02 15:00:37 -05:00
port Update copyright for 2023 2023-01-02 15:00:37 -05:00
postmaster Refactor DetermineSleepTime() to use milliseconds. 2023-01-12 16:32:30 +13:00
regex Update copyright for 2023 2023-01-02 15:00:37 -05:00
replication Ignore dropped and generated columns from the column list. 2023-01-13 14:49:23 +05:30
rewrite Revert "Get rid of the "new" and "old" entries in a view's rangetable." 2023-01-11 23:01:22 -05:00
snowball Update copyright for 2023 2023-01-02 15:00:37 -05:00
statistics Update copyright for 2023 2023-01-02 15:00:37 -05:00
storage Manual cleanup and pgindent of pgstat and bufmgr related code 2023-01-13 15:23:17 -08:00
tcop Use WaitEventSet API for postmaster's event loop. 2023-01-12 16:32:20 +13:00
tsearch New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
utils Store IdentLine->pg_user as an AuthToken 2023-01-16 13:58:07 +09:00
.gitignore
Makefile Update copyright for 2023 2023-01-02 15:00:37 -05:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
nls.mk NLS: Put list of available languages into LINGUAS files 2022-07-13 08:19:17 +02:00