mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +03:00
Add a comment noting that the owner_pid test in OwnLatch is just a sanity
check, per request by Jeff Davis.
This commit is contained in:
parent
d7a541a9a7
commit
c1ba7db6c1
@ -77,7 +77,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/port/unix_latch.c,v 1.2 2010/09/11 16:26:04 heikki Exp $
|
* $PostgreSQL: pgsql/src/backend/port/unix_latch.c,v 1.3 2010/09/13 18:01:20 heikki Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -156,6 +156,7 @@ OwnLatch(volatile Latch *latch)
|
|||||||
if (selfpipe_readfd == -1)
|
if (selfpipe_readfd == -1)
|
||||||
initSelfPipe();
|
initSelfPipe();
|
||||||
|
|
||||||
|
/* sanity check */
|
||||||
if (latch->owner_pid != 0)
|
if (latch->owner_pid != 0)
|
||||||
elog(ERROR, "latch already owned");
|
elog(ERROR, "latch already owned");
|
||||||
latch->owner_pid = MyProcPid;
|
latch->owner_pid = MyProcPid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user