8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f0adec commit 12e28aaCopy full SHA for 12e28aa
src/backend/storage/ipc/latch.c
@@ -402,6 +402,8 @@ InitSharedLatch(Latch *latch)
402
void
403
OwnLatch(Latch *latch)
404
{
405
+ int owner_pid;
406
+
407
/* Sanity checks */
408
Assert(latch->is_shared);
409
@@ -410,8 +412,9 @@ OwnLatch(Latch *latch)
410
412
Assert(selfpipe_readfd >= 0 && selfpipe_owner_pid == MyProcPid);
411
413
#endif
414
- if (latch->owner_pid != 0)
- elog(ERROR, "latch already owned");
415
+ owner_pid = latch->owner_pid;
416
+ if (owner_pid != 0)
417
+ elog(PANIC, "latch already owned by PID %d", owner_pid);
418
419
latch->owner_pid = MyProcPid;
420
}
0 commit comments