Skip to content

Commit f6ea1c3

Browse files
committed
Small refactoring
1 parent 0aa8b43 commit f6ea1c3

3 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/backend/access/aocs/aocsam.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ open_all_datumstreamread_segfiles(Relation rel,
120120
{
121121
AttrNumber attno = proj_atts[i];
122122

123-
RelationOpenSmgr(rel);
124-
125123
open_datumstreamread_segfile(basepath, rel->rd_smgr->smgr_ao, rel->rd_node, segInfo, ds[attno], attno);
126124
datumstreamread_block(ds[attno], blockDirectory, attno);
127125
}
@@ -1420,8 +1418,6 @@ openFetchSegmentFile(AOCSFetchDesc aocsFetchDesc,
14201418
if (logicalEof == 0)
14211419
return false;
14221420

1423-
RelationOpenSmgr(aocsFetchDesc->relation);
1424-
14251421
open_datumstreamread_segfile(aocsFetchDesc->basepath, aocsFetchDesc->relation->rd_smgr->smgr_ao, aocsFetchDesc->relation->rd_node,
14261422
fsInfo,
14271423
datumStreamFetchDesc->datumStream,

src/backend/access/appendonly/appendonlyam.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ SetNextFileSegForRead(AppendOnlyScanDesc scan)
289289
Assert(scan->initedStorageRoutines);
290290

291291

292-
RelationOpenSmgr(reln);
293292
AppendOnlyStorageRead_OpenFile(
294293
&scan->storageRead,
295294
scan->aos_filenamepath,

src/backend/cdb/cdbappendonlystorageread.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ AppendOnlyStorageRead_OpenFile(AppendOnlyStorageRead *storageRead,
320320
Assert(storageRead != NULL);
321321
Assert(storageRead->isActive);
322322
Assert(filePathName != NULL);
323+
Assert(storageRead->smgrAO);
323324

324325
/*
325326
* The EOF must be greater than 0, otherwise we risk transactionally

0 commit comments

Comments
 (0)