Hello,

As far as I see gin seems using GIN_EXCLUSIVE instead of
BUFFER_LOCK_EXCLUSIVE for LockBuffer, but the raw
BUFFER_LOCK_EXCLUSIVE appears in ginbuildempty().

Does it has a meaning to fix them to GIN_EXCLUSIVE?

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
diff --git a/src/backend/access/gin/gininsert.c b/src/backend/access/gin/gininsert.c
index b27cae3..004b3a9 100644
--- a/src/backend/access/gin/gininsert.c
+++ b/src/backend/access/gin/gininsert.c
@@ -442,10 +442,10 @@ ginbuildempty(PG_FUNCTION_ARGS)
 	/* An empty GIN index has two pages. */
 	MetaBuffer =
 		ReadBufferExtended(index, INIT_FORKNUM, P_NEW, RBM_NORMAL, NULL);
-	LockBuffer(MetaBuffer, BUFFER_LOCK_EXCLUSIVE);
+	LockBuffer(MetaBuffer, GIN_EXCLUSIVE);
 	RootBuffer =
 		ReadBufferExtended(index, INIT_FORKNUM, P_NEW, RBM_NORMAL, NULL);
-	LockBuffer(RootBuffer, BUFFER_LOCK_EXCLUSIVE);
+	LockBuffer(RootBuffer, GIN_EXCLUSIVE);
 
 	/* Initialize and xlog metabuffer and root buffer. */
 	START_CRIT_SECTION();
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to