pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Move extra code out of the Pre/PostRestoreCommand() section. 3+ messages / 1 participants [nested] [flat]
* pgsql: Move extra code out of the Pre/PostRestoreCommand() section. @ 2023-10-16 17:45 Nathan Bossart <nathan@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Nathan Bossart @ 2023-10-16 17:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Move extra code out of the Pre/PostRestoreCommand() section. If SIGTERM is received within this section, the startup process will immediately proc_exit() in the signal handler, so it is inadvisable to include any more code than is required there (as such code is unlikely to be compatible with doing proc_exit() in a signal handler). This commit moves the code recently added to this section (see 1b06d7bac9 and 7fed801135) to outside of the section. This ensures that the startup process only calls proc_exit() in its SIGTERM handler for the duration of the system() call, which is how this code worked from v8.4 to v14. Reported-by: Michael Paquier, Thomas Munro Analyzed-by: Andres Freund Suggested-by: Tom Lane Reviewed-by: Michael Paquier, Robert Haas, Thomas Munro, Andres Freund Discussion: https://postgr.es/m/Y9nGDSgIm83FHcad%40paquier.xyz Discussion: https://postgr.es/m/20230223231503.GA743455%40nathanxps13 Backpatch-through: 15 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/8fb13dd6ab5bffdbfafd8894ffcc5deb44d0c0b0 Modified Files -------------- src/backend/access/transam/xlogarchive.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Move extra code out of the Pre/PostRestoreCommand() section. @ 2023-10-16 17:45 Nathan Bossart <nathan@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Nathan Bossart @ 2023-10-16 17:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Move extra code out of the Pre/PostRestoreCommand() section. If SIGTERM is received within this section, the startup process will immediately proc_exit() in the signal handler, so it is inadvisable to include any more code than is required there (as such code is unlikely to be compatible with doing proc_exit() in a signal handler). This commit moves the code recently added to this section (see 1b06d7bac9 and 7fed801135) to outside of the section. This ensures that the startup process only calls proc_exit() in its SIGTERM handler for the duration of the system() call, which is how this code worked from v8.4 to v14. Reported-by: Michael Paquier, Thomas Munro Analyzed-by: Andres Freund Suggested-by: Tom Lane Reviewed-by: Michael Paquier, Robert Haas, Thomas Munro, Andres Freund Discussion: https://postgr.es/m/Y9nGDSgIm83FHcad%40paquier.xyz Discussion: https://postgr.es/m/20230223231503.GA743455%40nathanxps13 Backpatch-through: 15 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/882e522d64686ade162091a572118da2562f3569 Modified Files -------------- src/backend/access/transam/xlogarchive.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Move extra code out of the Pre/PostRestoreCommand() section. @ 2023-10-16 17:45 Nathan Bossart <nathan@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Nathan Bossart @ 2023-10-16 17:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Move extra code out of the Pre/PostRestoreCommand() section. If SIGTERM is received within this section, the startup process will immediately proc_exit() in the signal handler, so it is inadvisable to include any more code than is required there (as such code is unlikely to be compatible with doing proc_exit() in a signal handler). This commit moves the code recently added to this section (see 1b06d7bac9 and 7fed801135) to outside of the section. This ensures that the startup process only calls proc_exit() in its SIGTERM handler for the duration of the system() call, which is how this code worked from v8.4 to v14. Reported-by: Michael Paquier, Thomas Munro Analyzed-by: Andres Freund Suggested-by: Tom Lane Reviewed-by: Michael Paquier, Robert Haas, Thomas Munro, Andres Freund Discussion: https://postgr.es/m/Y9nGDSgIm83FHcad%40paquier.xyz Discussion: https://postgr.es/m/20230223231503.GA743455%40nathanxps13 Backpatch-through: 15 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d1c56ad37b9676df23cb12bdabfffce2a5fc01a7 Modified Files -------------- src/backend/access/transam/xlogarchive.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2023-10-16 17:45 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-10-16 17:45 pgsql: Move extra code out of the Pre/PostRestoreCommand() section. Nathan Bossart <nathan@postgresql.org> 2023-10-16 17:45 pgsql: Move extra code out of the Pre/PostRestoreCommand() section. Nathan Bossart <nathan@postgresql.org> 2023-10-16 17:45 pgsql: Move extra code out of the Pre/PostRestoreCommand() section. Nathan Bossart <nathan@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox