From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Latest version of Hot Standby patch |
Date: | 2009-01-07 09:35:10 |
Message-ID: | 4964774E.5060609@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Simon Riggs wrote:
> * btree VACUUM code - must scan every block of index (v6)
Need to unlock them too.
--- a/src/backend/access/nbtree/nbtxlog.c
+++ b/src/backend/access/nbtree/nbtxlog.c
@@ -472,7 +472,7 @@ btree_xlog_vacuum(XLogRecPtr lsn, XLogRecord *record)
xlrec = (xl_btree_vacuum *) XLogRecGetData(record);
/*
- * We need to ensure everyy block is unpinned between the
+ * We need to ensure every block is pinned between the
* lastBlockVacuumed and the current block, if there are any.
* This ensures that every block in the index is touched during
* VACUUM as required to ensure scans work correctly.
@@ -482,7 +482,11 @@ btree_xlog_vacuum(XLogRecPtr lsn, XLogRecord *record)
BlockNumber blkno = xlrec->lastBlockVacuumed + 1;
for (; blkno < xlrec->block; blkno++)
+ {
buffer = XLogReadBufferForCleanup(xlrec->node,
blkno, false);
+ if (BufferIsValid(buffer))
+ UnlockReleaseBuffer(buffer);
+ }
}
/*
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2009-01-07 09:45:22 | Re: version() output vs. 32/64 bits |
Previous Message | KaiGai Kohei | 2009-01-07 09:27:47 | Re: New patch for Column-level privileges |