Skip to content

Commit a481ff7

Browse files
committed
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.
1 parent 79dc97a commit a481ff7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/backend/storage/buffer/bufmgr.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.259 2010/08/14 02:22:10 rhaas Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.260 2010/08/20 01:07:50 rhaas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -82,7 +82,7 @@ static bool IsForInput;
8282
static volatile BufferDesc *PinCountWaitBuf = NULL;
8383

8484

85-
static Buffer ReadBuffer_common(SMgrRelation reln, bool isLocalBuf,
85+
static Buffer ReadBuffer_common(SMgrRelation reln,
8686
ForkNumber forkNum, BlockNumber blockNum,
8787
ReadBufferMode mode, BufferAccessStrategy strategy,
8888
bool *hit);
@@ -241,7 +241,7 @@ ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum,
241241
* miss.
242242
*/
243243
pgstat_count_buffer_read(reln);
244-
buf = ReadBuffer_common(reln->rd_smgr, reln->rd_istemp, forkNum, blockNum,
244+
buf = ReadBuffer_common(reln->rd_smgr, forkNum, blockNum,
245245
mode, strategy, &hit);
246246
if (hit)
247247
pgstat_count_buffer_hit(reln);
@@ -267,8 +267,7 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
267267

268268
SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
269269

270-
return ReadBuffer_common(smgr, false, forkNum, blockNum, mode, strategy,
271-
&hit);
270+
return ReadBuffer_common(smgr, forkNum, blockNum, mode, strategy, &hit);
272271
}
273272

274273

@@ -278,14 +277,15 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
278277
* *hit is set to true if the request was satisfied from shared buffer cache.
279278
*/
280279
static Buffer
281-
ReadBuffer_common(SMgrRelation smgr, bool isLocalBuf, ForkNumber forkNum,
280+
ReadBuffer_common(SMgrRelation smgr, ForkNumber forkNum,
282281
BlockNumber blockNum, ReadBufferMode mode,
283282
BufferAccessStrategy strategy, bool *hit)
284283
{
285284
volatile BufferDesc *bufHdr;
286285
Block bufBlock;
287286
bool found;
288287
bool isExtend;
288+
bool isLocalBuf = SmgrIsTemp(smgr);
289289

290290
*hit = false;
291291

0 commit comments

Comments
 (0)