Commit a481ff71 authored by Robert Haas's avatar Robert Haas

Remove the isLocalBuf argument from ReadBuffer_common.

Since an SMgrRelation now knows whether or not the underlying relation is
temporary, there's no point in also passing that information via an
additional argument.
parent 79dc97a4
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -82,7 +82,7 @@ static bool IsForInput; ...@@ -82,7 +82,7 @@ static bool IsForInput;
static volatile BufferDesc *PinCountWaitBuf = NULL; static volatile BufferDesc *PinCountWaitBuf = NULL;
static Buffer ReadBuffer_common(SMgrRelation reln, bool isLocalBuf, static Buffer ReadBuffer_common(SMgrRelation reln,
ForkNumber forkNum, BlockNumber blockNum, ForkNumber forkNum, BlockNumber blockNum,
ReadBufferMode mode, BufferAccessStrategy strategy, ReadBufferMode mode, BufferAccessStrategy strategy,
bool *hit); bool *hit);
...@@ -241,7 +241,7 @@ ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum, ...@@ -241,7 +241,7 @@ ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum,
* miss. * miss.
*/ */
pgstat_count_buffer_read(reln); 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); mode, strategy, &hit);
if (hit) if (hit)
pgstat_count_buffer_hit(reln); pgstat_count_buffer_hit(reln);
...@@ -267,8 +267,7 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum, ...@@ -267,8 +267,7 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
SMgrRelation smgr = smgropen(rnode, InvalidBackendId); SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
return ReadBuffer_common(smgr, false, forkNum, blockNum, mode, strategy, return ReadBuffer_common(smgr, forkNum, blockNum, mode, strategy, &hit);
&hit);
} }
...@@ -278,7 +277,7 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum, ...@@ -278,7 +277,7 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
* *hit is set to true if the request was satisfied from shared buffer cache. * *hit is set to true if the request was satisfied from shared buffer cache.
*/ */
static Buffer static Buffer
ReadBuffer_common(SMgrRelation smgr, bool isLocalBuf, ForkNumber forkNum, ReadBuffer_common(SMgrRelation smgr, ForkNumber forkNum,
BlockNumber blockNum, ReadBufferMode mode, BlockNumber blockNum, ReadBufferMode mode,
BufferAccessStrategy strategy, bool *hit) BufferAccessStrategy strategy, bool *hit)
{ {
...@@ -286,6 +285,7 @@ ReadBuffer_common(SMgrRelation smgr, bool isLocalBuf, ForkNumber forkNum, ...@@ -286,6 +285,7 @@ ReadBuffer_common(SMgrRelation smgr, bool isLocalBuf, ForkNumber forkNum,
Block bufBlock; Block bufBlock;
bool found; bool found;
bool isExtend; bool isExtend;
bool isLocalBuf = SmgrIsTemp(smgr);
*hit = false; *hit = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment