Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c1ba7db

Browse files
committed
Add a comment noting that the owner_pid test in OwnLatch is just a sanity
check, per request by Jeff Davis.
1 parent d7a541a commit c1ba7db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/port/unix_latch.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
* Portions Copyright (c) 1994, Regents of the University of California
7878
*
7979
* IDENTIFICATION
80-
* $PostgreSQL: pgsql/src/backend/port/unix_latch.c,v 1.2 2010/09/11 16:26:04 heikki Exp $
80+
* $PostgreSQL: pgsql/src/backend/port/unix_latch.c,v 1.3 2010/09/13 18:01:20 heikki Exp $
8181
*
8282
*-------------------------------------------------------------------------
8383
*/
@@ -156,6 +156,7 @@ OwnLatch(volatile Latch *latch)
156156
if (selfpipe_readfd == -1)
157157
initSelfPipe();
158158

159+
/* sanity check */
159160
if (latch->owner_pid != 0)
160161
elog(ERROR, "latch already owned");
161162
latch->owner_pid = MyProcPid;

0 commit comments

Comments
 (0)