From 7aa772f03e03c361683cf05c8cd66a9bfc8956c7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 18 Aug 2006 16:09:13 +0000 Subject: 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. --- src/include/access/heapam.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/include/access/heapam.h') diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index a2ca20bddd..772a6588fa 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); -- cgit v1.2.1