aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/unix_latch.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2010-09-13 18:01:20 +0000
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2010-09-13 18:01:20 +0000
commitc1ba7db6c1cc6f1e41b58c5b89f5f838653f4bf0 (patch)
tree108cd89c784058ee532fca7ed7e86290c3441af9 /src/backend/port/unix_latch.c
parentd7a541a9a7927b2478084e7d20a026cb87dcfa3b (diff)
downloadpostgresql-c1ba7db6c1cc6f1e41b58c5b89f5f838653f4bf0.tar.gz
postgresql-c1ba7db6c1cc6f1e41b58c5b89f5f838653f4bf0.zip
Add a comment noting that the owner_pid test in OwnLatch is just a sanity
check, per request by Jeff Davis.
Diffstat (limited to 'src/backend/port/unix_latch.c')
-rw-r--r--src/backend/port/unix_latch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/port/unix_latch.c b/src/backend/port/unix_latch.c
index 3f1e8739213..e1cb6f219e9 100644
--- a/src/backend/port/unix_latch.c
+++ b/src/backend/port/unix_latch.c
@@ -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;