MCPcopy Create free account
hub / github.com/apache/cloudberry / BufFileFlush

Function BufFileFlush

src/backend/storage/file/buffile.c:884–907  ·  view source on GitHub ↗

* BufFileFlush * * Like fflush(), except that I/O errors are reported with ereport(). */

Source from the content-addressed store, hash-verified

882 * Like fflush(), except that I/O errors are reported with ereport().
883 */
884static void
885BufFileFlush(BufFile *file)
886{
887 switch (file->state)
888 {
889 case BFS_RANDOM_ACCESS:
890 case BFS_SEQUENTIAL_WRITING:
891 break;
892
893 case BFS_COMPRESSED_WRITING:
894 BufFileEndCompression(file);
895 break;
896
897 case BFS_SEQUENTIAL_READING:
898 case BFS_COMPRESSED_READING:
899 /* no-op. */
900 return;
901 }
902
903 if (file->dirty)
904 BufFileDumpBuffer(file);
905
906 Assert(!file->dirty);
907}
908
909/*
910 * BufFileSeek

Callers 6

BufFileExportSharedFunction · 0.85
BufFileCloseFunction · 0.85
BufFileReadFunction · 0.85
BufFileReadFromBufferFunction · 0.85
BufFileSeekFunction · 0.85
BufFileSuspendFunction · 0.85

Calls 2

BufFileEndCompressionFunction · 0.85
BufFileDumpBufferFunction · 0.85

Tested by

no test coverage detected