Skip to content

Commit 03c99a9

Browse files
committed
Use smgrAO iface where appropriate.
Grennplum uses smgr proxy feature to allow hijacking execution flow of AO/AOCS relation storage interaction. Use that, instead of plain FileSomething functions.
1 parent 3be3ebe commit 03c99a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/cdb/cdbappendonlystoragewrite.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,14 +410,14 @@ AppendOnlyStorageWrite_FlushAndCloseFile(
410410
* primary. Temp tables are not crash safe, no need to fsync them.
411411
*/
412412
if (!RelFileNodeBackendIsTemp(storageWrite->relFileNode) &&
413-
FileSync(storageWrite->file, WAIT_EVENT_DATA_FILE_SYNC) != 0)
413+
storageWrite->smgrAO->smgr_FileSync(storageWrite->file, WAIT_EVENT_DATA_FILE_SYNC) != 0)
414414
ereport(ERROR,
415415
(errcode_for_file_access(),
416416
errmsg("Could not flush (fsync) Append-Only segment file '%s' to disk for relation '%s': %m",
417417
storageWrite->segmentFileName,
418418
storageWrite->relationName)));
419419

420-
FileClose(storageWrite->file);
420+
storageWrite->smgrAO->smgr_FileClose(storageWrite->file);
421421

422422
storageWrite->file = -1;
423423
storageWrite->formatVersion = -1;

0 commit comments

Comments
 (0)