diff --git a/src/backend/storage/ipc/shm_mq.c b/src/backend/storage/ipc/shm_mq.c
index 2c79a649f46..bb8eff28581 100644
--- a/src/backend/storage/ipc/shm_mq.c
+++ b/src/backend/storage/ipc/shm_mq.c
@@ -1015,8 +1015,10 @@ shm_mq_send_bytes(shm_mq_handle *mqh, Size nbytes, const void *data,
 			 * at top of loop, because setting an already-set latch is much
 			 * cheaper than setting one that has been reset.
 			 */
+fprintf(stderr, "!!!shm_mq_send_bytes[%d]| before WaitLatch\n", getpid());
 			(void) WaitLatch(MyLatch, WL_LATCH_SET | WL_EXIT_ON_PM_DEATH, 0,
 							 WAIT_EVENT_MESSAGE_QUEUE_SEND);
+fprintf(stderr, "!!!shm_mq_send_bytes[%d]| after WaitLatch\n", getpid());
 
 			/* Reset the latch so we don't spin. */
 			ResetLatch(MyLatch);
@@ -1161,8 +1163,10 @@ shm_mq_receive_bytes(shm_mq_handle *mqh, Size bytes_needed, bool nowait,
 		 * loop, because setting an already-set latch is much cheaper than
 		 * setting one that has been reset.
 		 */
+fprintf(stderr, "!!!shm_mq_receive_bytes[%d]| before WaitLatch\n", getpid());
 		(void) WaitLatch(MyLatch, WL_LATCH_SET | WL_EXIT_ON_PM_DEATH, 0,
 						 WAIT_EVENT_MESSAGE_QUEUE_RECEIVE);
+fprintf(stderr, "!!!shm_mq_receive_bytes[%d]| after WaitLatch\n", getpid());
 
 		/* Reset the latch so we don't spin. */
 		ResetLatch(MyLatch);
diff --git a/src/backend/storage/ipc/waiteventset.c b/src/backend/storage/ipc/waiteventset.c
index 7c0e66900f9..dcf7b2c111d 100644
--- a/src/backend/storage/ipc/waiteventset.c
+++ b/src/backend/storage/ipc/waiteventset.c
@@ -1497,6 +1497,18 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
 		/* timeout exceeded */
 		return -1;
 	}
+fprintf(stderr, "!!!WaitEventSetWaitBlock POLL[%d]| rc: %d\n", getpid(), rc);
+fprintf(stderr, "!!!WaitEventSetWaitBlock[%d] 1\n", getpid());
+fprintf(stderr, "!!!WaitEventSetWaitBlock[%d] 2\n", getpid());
+fprintf(stderr, "!!!WaitEventSetWaitBlock[%d] 3\n", getpid());
+fprintf(stderr, "!!!WaitEventSetWaitBlock[%d] 4\n", getpid());
+fprintf(stderr, "!!!WaitEventSetWaitBlock[%d] 5\n", getpid());
+fprintf(stderr, "!!!WaitEventSetWaitBlock[%d] 5\n", getpid());
+fprintf(stderr, "!!!WaitEventSetWaitBlock[%d] 6\n", getpid());
+fprintf(stderr, "!!!WaitEventSetWaitBlock[%d] 7\n", getpid());
+fprintf(stderr, "!!!WaitEventSetWaitBlock[%d] 8\n", getpid());
+fprintf(stderr, "!!!WaitEventSetWaitBlock[%d] 9\n", getpid());
+fprintf(stderr, "!!!WaitEventSetWaitBlock[%d] 10\n", getpid());
 
 	for (cur_event = set->events, cur_pollfd = set->pollfds;
 		 cur_event < (set->events + set->nevents) &&
