|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "commands/tablespace.h"#include "executor/instrument.h"#include "miscadmin.h"#include "pgstat.h"#include "storage/buffile.h"#include "storage/bufmgr.h"#include "storage/fd.h"#include "utils/resowner.h"#include "utils/wait_event.h"
Go to the source code of this file.
Data Structures | |
| struct | BufFile |
Macros | |
| #define | MAX_PHYSICAL_FILESIZE 0x40000000 |
| #define | BUFFILE_SEG_SIZE (MAX_PHYSICAL_FILESIZE / BLCKSZ) |
| #define BUFFILE_SEG_SIZE (MAX_PHYSICAL_FILESIZE / BLCKSZ) |
Definition at line 906 of file buffile.c.
References Assert, BUFFILE_SEG_SIZE, elog, ERROR, fb(), BufFile::files, i, BufFile::numFiles, repalloc(), BufFile::resowner, and source.
Referenced by LogicalTapeImport().
Definition at line 413 of file buffile.c.
References BufFileFlush(), FileClose(), BufFile::files, i, BufFile::numFiles, and pfree().
Referenced by decode_concurrent_changes(), ensure_last_message(), ExecHashJoinNewBatch(), ExecHashTableDestroy(), export_initial_snapshot(), get_initial_snapshot(), gistFreeBuildBuffers(), LogicalTapeSetClose(), process_concurrent_changes(), SendBackupManifest(), stream_abort_internal(), stream_close_file(), sts_end_parallel_scan(), sts_end_write(), sts_parallel_scan_next(), subxact_info_read(), subxact_info_write(), tuplestore_clear(), and tuplestore_end().
Definition at line 268 of file buffile.c.
References BufFile::files, BufFile::fileset, makeBufFileCommon(), MakeNewFileSetSegment(), BufFile::name, name, palloc_object, pstrdup(), and BufFile::readOnly.
Referenced by decode_concurrent_changes(), export_initial_snapshot(), LogicalTapeSetCreate(), stream_open_file(), sts_puttuple(), and subxact_info_write().
Definition at line 194 of file buffile.c.
References Assert, BufFile::isInterXact, makeBufFile(), OpenTemporaryFile(), and PrepareTempTablespaces().
Referenced by ExecHashJoinSaveTuple(), gistInitBuildBuffers(), InitializeBackupManifest(), LogicalTapeSetCreate(), and tuplestore_puttuple_common().
Definition at line 365 of file buffile.c.
References CHECK_FOR_INTERRUPTS, elog, ERROR, fb(), FileSetDelete(), FileSetSegmentName(), MAXPGPATH, and name.
Referenced by stream_cleanup_files(), and subxact_info_write().
Definition at line 498 of file buffile.c.
References Assert, BufFile::buffer, BufFile::curFile, BufFile::curOffset, PGAlignedBlock::data, BufFile::dirty, ereport, errcode_for_file_access(), errmsg, ERROR, extendBufFile(), fb(), FilePathName(), BufFile::files, FileWrite(), INSTR_TIME_ACCUM_DIFF, INSTR_TIME_SET_CURRENT, INSTR_TIME_SET_ZERO, MAX_PHYSICAL_FILESIZE, BufFile::nbytes, BufFile::numFiles, pgBufferUsage, BufFile::pos, BufferUsage::temp_blk_write_time, BufferUsage::temp_blks_written, track_io_timing, and wpos.
Referenced by BufFileFlush(), and BufFileWrite().
Definition at line 395 of file buffile.c.
References Assert, BufFileFlush(), fb(), BufFile::fileset, and BufFile::readOnly.
Referenced by LogicalTapeFreeze().
Definition at line 725 of file buffile.c.
References Assert, BufFileDumpBuffer(), and BufFile::dirty.
Referenced by BufFileClose(), BufFileExportFileSet(), BufFileReadCommon(), and BufFileSeek().
Definition at line 435 of file buffile.c.
References BufFile::buffer, BufFile::curFile, BufFile::curOffset, PGAlignedBlock::data, ereport, errcode_for_file_access(), errmsg, ERROR, fb(), FilePathName(), FileRead(), BufFile::files, INSTR_TIME_ACCUM_DIFF, INSTR_TIME_SET_CURRENT, INSTR_TIME_SET_ZERO, MAX_PHYSICAL_FILESIZE, BufFile::nbytes, BufFile::numFiles, pgBufferUsage, BufferUsage::temp_blk_read_time, BufferUsage::temp_blks_read, and track_io_timing.
Referenced by BufFileReadCommon().
Definition at line 292 of file buffile.c.
References CHECK_FOR_INTERRUPTS, ereport, errcode_for_file_access(), errmsg, ERROR, fb(), BufFile::files, BufFile::fileset, FileSetOpen(), FileSetSegmentName(), makeBufFileCommon(), MAXPGPATH, mode, BufFile::name, name, palloc_array, pfree(), pstrdup(), BufFile::readOnly, and repalloc_array.
Referenced by apply_spooled_messages(), ensure_last_message(), get_initial_snapshot(), LogicalTapeImport(), process_concurrent_changes(), stream_abort_internal(), stream_open_file(), sts_parallel_scan_next(), subxact_info_read(), and subxact_info_write().
Definition at line 650 of file buffile.c.
References BufFileReadCommon().
|
static |
Definition at line 598 of file buffile.c.
References Assert, BufFile::buffer, BufFileFlush(), BufFileLoadBuffer(), BufFile::curOffset, PGAlignedBlock::data, ereport, errcode_for_file_access(), errmsg, ERROR, fb(), memcpy(), BufFile::name, BufFile::nbytes, and BufFile::pos.
Referenced by BufFileRead(), BufFileReadExact(), and BufFileReadMaybeEOF().
Definition at line 659 of file buffile.c.
References BufFileReadCommon().
Referenced by apply_spooled_messages(), ExecHashJoinGetSavedTuple(), get_initial_snapshot(), ltsReadBlock(), ReadTempFileBlock(), readtup_heap(), restore_tuple(), SendBackupManifest(), sts_parallel_scan_next(), sts_read_tuple(), and subxact_info_read().
Definition at line 669 of file buffile.c.
References BufFileReadCommon(), and fb().
Referenced by apply_concurrent_changes(), apply_spooled_messages(), ExecHashJoinGetSavedTuple(), and getlen().
Definition at line 745 of file buffile.c.
References BufFileFlush(), BufFile::curFile, BufFile::curOffset, elog, ereport, errcode_for_file_access(), errmsg, ERROR, fb(), FilePathName(), BufFile::files, FileSize(), MAX_PHYSICAL_FILESIZE, BufFile::name, BufFile::nbytes, BufFile::numFiles, and BufFile::pos.
Referenced by BufFileSeekBlock(), ensure_last_message(), ExecHashJoinNewBatch(), SendBackupManifest(), stream_open_file(), tuplestore_copy_read_pointer(), tuplestore_gettuple(), tuplestore_puttuple_common(), tuplestore_rescan(), and tuplestore_select_read_pointer().
Definition at line 855 of file buffile.c.
References BUFFILE_SEG_SIZE, BufFileSeek(), and fb().
Referenced by ltsReadBlock(), ltsWriteBlock(), ReadTempFileBlock(), sts_parallel_scan_next(), and WriteTempFileBlock().
Definition at line 870 of file buffile.c.
References ereport, errcode_for_file_access(), errmsg, ERROR, fb(), FilePathName(), BufFile::files, FileSize(), MAX_PHYSICAL_FILESIZE, BufFile::name, and BufFile::numFiles.
Referenced by LogicalTapeImport(), and tuplestore_updatemax().
Definition at line 837 of file buffile.c.
References BufFile::curFile, BufFile::curOffset, and BufFile::pos.
Referenced by apply_spooled_messages(), dumptuples(), ensure_last_message(), subxact_info_add(), tuplestore_copy_read_pointer(), tuplestore_gettuple(), tuplestore_puttuple_common(), and tuplestore_select_read_pointer().
Definition at line 932 of file buffile.c.
References BufFile::curFile, BufFile::curOffset, ereport, errcode_for_file_access(), errmsg, ERROR, fb(), FileClose(), FilePathName(), BufFile::files, BufFile::fileset, FileSetDelete(), FileSetSegmentName(), FileTruncate(), i, MAX_PHYSICAL_FILESIZE, MAXPGPATH, BufFile::name, BufFile::nbytes, BufFile::numFiles, and BufFile::pos.
Referenced by stream_abort_internal().
Definition at line 681 of file buffile.c.
References Assert, BufFile::buffer, BufFileDumpBuffer(), BufFile::curOffset, PGAlignedBlock::data, BufFile::dirty, fb(), memcpy(), BufFile::nbytes, BufFile::pos, and BufFile::readOnly.
Referenced by AppendStringToManifest(), ExecHashJoinSaveTuple(), export_initial_snapshot(), ltsWriteBlock(), repack_store_change(), stream_write_change(), sts_flush_chunk(), subxact_info_write(), WriteTempFileBlock(), and writetup_heap().
Definition at line 157 of file buffile.c.
References Assert, CurrentResourceOwner, fb(), BufFile::files, BufFile::fileset, BufFile::isInterXact, MakeNewFileSetSegment(), BufFile::numFiles, OpenTemporaryFile(), repalloc(), and BufFile::resowner.
Referenced by BufFileDumpBuffer().
Definition at line 223 of file buffile.c.
References fb(), MAXPGPATH, name, and snprintf.
Referenced by BufFileDeleteFileSet(), BufFileOpenFileSet(), BufFileTruncateFileSet(), and MakeNewFileSetSegment().
Definition at line 140 of file buffile.c.
References fb(), BufFile::files, BufFile::fileset, makeBufFileCommon(), BufFile::name, palloc_object, and BufFile::readOnly.
Referenced by BufFileCreateTemp().
Definition at line 119 of file buffile.c.
References BufFile::curFile, BufFile::curOffset, CurrentResourceOwner, BufFile::dirty, fb(), BufFile::isInterXact, BufFile::nbytes, BufFile::numFiles, palloc_object, BufFile::pos, and BufFile::resowner.
Referenced by BufFileCreateFileSet(), BufFileOpenFileSet(), and makeBufFile().
Definition at line 232 of file buffile.c.
References Assert, BufFile::fileset, FileSetCreate(), FileSetDelete(), FileSetSegmentName(), MAXPGPATH, BufFile::name, and name.
Referenced by BufFileCreateFileSet(), and extendBufFile().