diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index f4091ec..f7247d0 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -326,7 +326,12 @@ InitProcess(void)
 	MyProc->waitLock = NULL;
 	MyProc->waitProcLock = NULL;
 	for (i = 0; i < NUM_LOCK_PARTITIONS; i++)
+	{
+		SHM_QUEUE *queue = &(MyProc->myProcLocks[i]);
+		Assert(!queue->prev || queue->prev == queue);
+		Assert(!queue->next || queue->next == queue);
 		SHMQueueInit(&(MyProc->myProcLocks[i]));
+	}
 	MyProc->recoveryConflictPending = false;
 
 	/* Initialize fields for sync rep */
