Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/backend/storage/lmgr/lwlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
#include "miscadmin.h"
#include "pg_trace.h"
#include "pgstat.h"
#include "access/xlogrecovery.h"
#include "port/pg_bitutils.h"
#include "postmaster/postmaster.h"
#include "storage/proc.h"
Expand Down Expand Up @@ -1057,7 +1058,7 @@ LWLockQueueSelf(LWLock *lock, LWLockMode mode)
MyProc->lwWaitMode = mode;

/* LW_WAIT_UNTIL_FREE waiters are always at the front of the queue */
if (mode == LW_WAIT_UNTIL_FREE)
if (mode == LW_WAIT_UNTIL_FREE || AmStartupProcess())
proclist_push_head(&lock->waiters, MyProcNumber, lwWaitLink);
else
proclist_push_tail(&lock->waiters, MyProcNumber, lwWaitLink);
Expand Down
Loading