File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ uirpcShmemInit()
9090static void
9191SendCurrentUserId (void )
9292{
93+ LWLockAcquire (resptr -> lock , LW_EXCLUSIVE );
9394 LWLockUpdateVar (resptr -> lock , (uint64 * ) & resptr -> userid , GetUserId ());
95+ LWLockRelease (resptr -> lock );
9496}
9597
9698/*
@@ -125,8 +127,6 @@ GetRemoteBackendUserId(PGPROC *proc)
125127 Assert (resptr != NULL );
126128 Assert (proc && proc != MyProc && proc -> backendId != InvalidBackendId );
127129
128- LWLockAcquire (resptr -> lock , LW_EXCLUSIVE );
129-
130130 sig_result = SendProcSignal (proc -> pid , UserPollReason , proc -> backendId );
131131 if (sig_result == -1 )
132132 ereport (ERROR , (errcode (ERRCODE_INTERNAL_ERROR ),
@@ -138,7 +138,5 @@ GetRemoteBackendUserId(PGPROC *proc)
138138 result ,
139139 (uint64 * ) & result );
140140
141- LWLockRelease (resptr -> lock );
142-
143141 return result ;
144142}
You can’t perform that action at this time.
0 commit comments