diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c
index 3d62417387b33cca2451df7fe3bb3b526b61a0e8..3576fe28a773e409c1f0078719d45ed49bc2f358 100644
--- a/src/backend/access/transam/clog.c
+++ b/src/backend/access/transam/clog.c
@@ -26,7 +26,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/backend/access/transam/clog.c,v 1.49 2008/11/03 19:24:03 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/clog.c,v 1.50 2008/11/03 19:26:07 alvherre Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -324,7 +324,7 @@ TransactionIdSetStatusBit(TransactionId xid, XidStatus status, XLogRecPtr lsn, i
 	char		curval;
 
 	byteptr = ClogCtl->shared->page_buffer[slotno] + byteno;
-	curval = (*byteptr >> shift) & CLOG_XACT_BITMASK;
+	curval = (*byteptr >> bshift) & CLOG_XACT_BITMASK;
 
 	/*
 	 * When replaying transactions during recovery we still need to perform