summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-08-18 16:09:13 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-08-18 16:09:13 +0000
commit7aa772f03e03c361683cf05c8cd66a9bfc8956c7 (patch)
tree4fb82294b3cdbdb9ddb9b8bd3c81407d6189bb57 /src/include
parente91600d1c2e79914e6c8ac445c340e704c710b66 (diff)
Now that we've rearranged relation open to get a lock before touching
the rel, it's easy to get rid of the narrow race-condition window that used to exist in VACUUM and CLUSTER. Did some minor code-beautification work in the same area, too.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/heapam.h5
-rw-r--r--src/include/storage/lmgr.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index a2ca20bddd9..772a6588fae 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.114 2006/07/03 22:45:39 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.115 2006/08/18 16:09:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -129,7 +129,8 @@ typedef enum
} LockTupleMode;
extern Relation relation_open(Oid relationId, LOCKMODE lockmode);
-extern Relation conditional_relation_open(Oid relationId, LOCKMODE lockmode, bool nowait);
+extern Relation try_relation_open(Oid relationId, LOCKMODE lockmode);
+extern Relation relation_open_nowait(Oid relationId, LOCKMODE lockmode);
extern Relation relation_openrv(const RangeVar *relation, LOCKMODE lockmode);
extern void relation_close(Relation relation, LOCKMODE lockmode);
diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h
index d0f9ba2b9c6..ea7a1bf948f 100644
--- a/src/include/storage/lmgr.h
+++ b/src/include/storage/lmgr.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/lmgr.h,v 1.55 2006/07/31 20:09:05 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/lmgr.h,v 1.56 2006/08/18 16:09:13 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,6 +24,7 @@ extern void RelationInitLockInfo(Relation relation);
extern void LockRelationOid(Oid relid, LOCKMODE lockmode);
extern bool ConditionalLockRelationOid(Oid relid, LOCKMODE lockmode);
extern void UnlockRelationId(LockRelId *relid, LOCKMODE lockmode);
+extern void UnlockRelationOid(Oid relid, LOCKMODE lockmode);
extern void LockRelation(Relation relation, LOCKMODE lockmode);
extern bool ConditionalLockRelation(Relation relation, LOCKMODE lockmode);