Re: Latest version of Hot Standby patch - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Latest version of Hot Standby patch
Date
Msg-id 4964774E.5060609@enterprisedb.com
Whole thread Raw
In response to Re: Latest version of Hot Standby patch  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Latest version of Hot Standby patch  (Simon Riggs <simon@2ndQuadrant.com>)
List 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
thereare any.         * This ensures that every block in the index is touched during         * VACUUM as required to
ensurescans 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


pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: New patch for Column-level privileges
Next
From: Peter Eisentraut
Date:
Subject: Re: version() output vs. 32/64 bits