postgresql/src/fe_utils
Michael Paquier 2f6e15ac93 Revert refactoring of restore command code to shell_restore.c
This reverts commits 24c35ec and 57169ad.  PreRestoreCommand() and
PostRestoreCommand() need to be put closer to the system() call calling
a restore_command, as they enable in_restore_command for the startup
process which would in turn trigger an immediate proc_exit() in the
SIGTERM handler.  Perhaps we could get rid of this behavior entirely,
but 24c35ec has made the window where the flag is enabled much larger
than it was, and any Postgres-like actions (palloc, etc.) taken by code
paths while the flag is enabled could lead to more severe issues in the
shutdown processing.

Note that curculio has showed that there are much more problems in this
area, unrelated to this change, actually, hence the issues related to
that had better be addressed first.  Keeping the code of HEAD in line
with the stable branches should make that a bit easier.

Per discussion with Andres Freund and Nathan Bossart.

Discussion: https://postgr.es/m/Y979NR3U5VnWrTwB@paquier.xyz
2023-02-06 08:28:42 +09:00
..
.gitignore Move psql's psqlscan.l into src/fe_utils. 2016-03-24 20:28:47 -04:00
Makefile Update copyright for 2023 2023-01-02 15:00:37 -05:00
archive.c Revert refactoring of restore command code to shell_restore.c 2023-02-06 08:28:42 +09:00
cancel.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
conditional.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
connect_utils.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
mbprint.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
option_utils.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
parallel_slot.c Add options to control whether VACUUM runs vac_update_datfrozenxid. 2023-01-06 14:17:25 -05:00
print.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
psqlscan.l Allow underscores in integer and numeric constants. 2023-02-04 09:48:51 +00:00
query_utils.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
recovery_gen.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
simple_list.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
string_utils.c Update copyright for 2023 2023-01-02 15:00:37 -05:00