*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.259 2010/08/14 02:22:10 rhaas Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.260 2010/08/20 01:07:50 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
static volatile BufferDesc *PinCountWaitBuf = NULL;
-static Buffer ReadBuffer_common(SMgrRelation reln, bool isLocalBuf,
+static Buffer ReadBuffer_common(SMgrRelation reln,
ForkNumber forkNum, BlockNumber blockNum,
ReadBufferMode mode, BufferAccessStrategy strategy,
bool *hit);
* miss.
*/
pgstat_count_buffer_read(reln);
- buf = ReadBuffer_common(reln->rd_smgr, reln->rd_istemp, forkNum, blockNum,
+ buf = ReadBuffer_common(reln->rd_smgr, forkNum, blockNum,
mode, strategy, &hit);
if (hit)
pgstat_count_buffer_hit(reln);
SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
- return ReadBuffer_common(smgr, false, forkNum, blockNum, mode, strategy,
- &hit);
+ return ReadBuffer_common(smgr, forkNum, blockNum, mode, strategy, &hit);
}
* *hit is set to true if the request was satisfied from shared buffer cache.
*/
static Buffer
-ReadBuffer_common(SMgrRelation smgr, bool isLocalBuf, ForkNumber forkNum,
+ReadBuffer_common(SMgrRelation smgr, ForkNumber forkNum,
BlockNumber blockNum, ReadBufferMode mode,
BufferAccessStrategy strategy, bool *hit)
{
Block bufBlock;
bool found;
bool isExtend;
+ bool isLocalBuf = SmgrIsTemp(smgr);
*hit = false;