fix_smart_shutdown_in_recovery.patch

application/octet-stream

Filename: fix_smart_shutdown_in_recovery.patch
Type: application/octet-stream
Part: 0
Message: Re: Stefan's bug (was: max_standby_delay considered harmful)

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/backend/postmaster/postmaster.c 1 1
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 9a498d5..974ca3a 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -2168,7 +2168,7 @@ pmdie(SIGNAL_ARGS)
 					(errmsg("received smart shutdown request")));
 
 			if (pmState == PM_RUN || pmState == PM_RECOVERY ||
-				pmState == PM_HOT_STANDBY)
+				pmState == PM_HOT_STANDBY || pmState == PM_STARTUP)
 			{
 				/* autovacuum workers are told to shut down immediately */
 				SignalAutovacWorkers(SIGTERM);