ForkNumber forkNum,
BlockNumber blockNum,
BufferAccessStrategy strategy,
+ IOObject io_object,
+ IOContext io_context,
bool *foundPtr)
{
BufferDesc *bufHdr;
- IOContext io_context;
- IOObject io_object;
Assert(blockNum != P_NEW);
persistence == RELPERSISTENCE_PERMANENT ||
persistence == RELPERSISTENCE_UNLOGGED));
- if (persistence == RELPERSISTENCE_TEMP)
- {
- io_context = IOCONTEXT_NORMAL;
- io_object = IOOBJECT_TEMP_RELATION;
- }
- else
- {
- io_context = IOContextForStrategy(strategy);
- io_object = IOOBJECT_RELATION;
- }
-
TRACE_POSTGRESQL_BUFFER_READ_START(forkNum, blockNum,
smgr->smgr_rlocator.locator.spcOid,
smgr->smgr_rlocator.locator.dbOid,
mode == RBM_ZERO_AND_LOCK))
{
bool found;
+ IOContext io_context;
+ IOObject io_object;
+
+ if (persistence == RELPERSISTENCE_TEMP)
+ {
+ io_context = IOCONTEXT_NORMAL;
+ io_object = IOOBJECT_TEMP_RELATION;
+ }
+ else
+ {
+ io_context = IOContextForStrategy(strategy);
+ io_object = IOOBJECT_RELATION;
+ }
buffer = PinBufferForBlock(rel, smgr, persistence,
- forkNum, blockNum, strategy, &found);
+ forkNum, blockNum, strategy,
+ io_object, io_context, &found);
ZeroAndLockBuffer(buffer, mode, found);
return buffer;
}
int actual_nblocks = *nblocks;
int maxcombine = 0;
bool did_start_io;
+ IOContext io_context;
+ IOObject io_object;
Assert(*nblocks == 1 || allow_forwarding);
Assert(*nblocks > 0);
Assert(*nblocks <= MAX_IO_COMBINE_LIMIT);
+ if (operation->persistence == RELPERSISTENCE_TEMP)
+ {
+ io_context = IOCONTEXT_NORMAL;
+ io_object = IOOBJECT_TEMP_RELATION;
+ }
+ else
+ {
+ io_context = IOContextForStrategy(operation->strategy);
+ io_object = IOOBJECT_RELATION;
+ }
+
for (int i = 0; i < actual_nblocks; ++i)
{
bool found;
operation->forknum,
blockNum + i,
operation->strategy,
+ io_object, io_context,
&found);
}