diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index f53aa9c404d..d1db634644b 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -68,6 +68,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <time.h>
+#include <sys/time.h>
 #include <sys/wait.h>
 #include <ctype.h>
 #include <sys/stat.h>
@@ -2253,6 +2254,16 @@ handle_pm_child_exit_signal(SIGNAL_ARGS)
 	SetLatch(MyLatch);
 }
 
+static pid_t
+_waitpid(pid_t pid, int *status, int options)
+{
+pid_t ret;
+elog(LOG, "!!!waitpid| pid: %d", pid);
+ret = waitpid(pid, status, options);
+elog(LOG, "!!!waitpid| ret: %d, status: %d", ret, *status);
+return ret;
+}
+
 /*
  * Cleanup after a child process dies.
  */
@@ -2267,7 +2278,7 @@ process_pm_child_exit(void)
 	ereport(DEBUG4,
 			(errmsg_internal("reaping dead processes")));
 
-	while ((pid = waitpid(-1, &exitstatus, WNOHANG)) > 0)
+	while ((pid = _waitpid(-1, &exitstatus, WNOHANG)) > 0)
 	{
 		PMChild    *pmchild;
 
@@ -3519,6 +3530,13 @@ signal_child(PMChild *pmchild, int signal)
 							 GetBackendTypeDesc(pmchild->bkend_type),
 							 (int) pmchild->pid)));
 
+if (pmchild == StartupPMChild && signal == SIGQUIT)
+{
+struct timeval current_time;
+do gettimeofday(&current_time, NULL); while ((current_time.tv_usec / 1000) % 100 >= 2);
+elog(LOG, "!!!signal_child| delayed signal %d/%s to startup process with pid %d", signal, pm_signame(signal), (int) pmchild->pid);
+}
+
 	if (kill(pid, signal) < 0)
 		elog(DEBUG3, "kill(%ld,%d) failed: %m", (long) pid, signal);
 #ifdef HAVE_SETSID
diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c
index cb944edd8df..e96b3c2a035 100644
--- a/src/backend/storage/ipc/ipc.c
+++ b/src/backend/storage/ipc/ipc.c
@@ -22,6 +22,7 @@
 #include <signal.h>
 #include <unistd.h>
 #include <sys/stat.h>
+#include <sys/time.h>
 
 #include "miscadmin.h"
 #ifdef PROFILE_PID_DIR
@@ -154,6 +155,13 @@ proc_exit(int code)
 
 	elog(DEBUG3, "exit(%d)", code);
 
+if (AmStartupProcess() && code == 0)
+{
+struct timeval current_time;
+pg_usleep(250000);
+do gettimeofday(&current_time, NULL); while ((current_time.tv_usec / 1000) % 100 >= 2);
+elog(LOG, "!!!proc_exit| delayed exit(0) for startup process");
+}
 	exit(code);
 }
 
