Add a comment noting that the owner_pid test in OwnLatch is just a sanity
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 13 Sep 2010 18:01:20 +0000 (18:01 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 13 Sep 2010 18:01:20 +0000 (18:01 +0000)
check, per request by Jeff Davis.

src/backend/port/unix_latch.c

index 3f1e8739213bfc5774c94821e7e832e4e34ace86..e1cb6f219e98b95c47f87a22b2dc8b7aa97b21be 100644 (file)
@@ -77,7 +77,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * 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)
        initSelfPipe();
 
+   /* sanity check */
    if (latch->owner_pid != 0)
        elog(ERROR, "latch already owned");
    latch->owner_pid = MyProcPid;