PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | SharedFileSet |
Typedefs | |
typedef struct SharedFileSet | SharedFileSet |
Functions | |
void | SharedFileSetInit (SharedFileSet *fileset, dsm_segment *seg) |
void | SharedFileSetAttach (SharedFileSet *fileset, dsm_segment *seg) |
File | SharedFileSetCreate (SharedFileSet *fileset, const char *name) |
File | SharedFileSetOpen (SharedFileSet *fileset, const char *name, int mode) |
bool | SharedFileSetDelete (SharedFileSet *fileset, const char *name, bool error_on_failure) |
void | SharedFileSetDeleteAll (SharedFileSet *fileset) |
void | SharedFileSetUnregister (SharedFileSet *input_fileset) |
typedef struct SharedFileSet SharedFileSet |
void SharedFileSetAttach | ( | SharedFileSet * | fileset, |
dsm_segment * | seg | ||
) |
Definition at line 127 of file sharedfileset.c.
References ereport, errcode(), errmsg(), ERROR, SharedFileSet::mutex, on_dsm_detach(), PointerGetDatum, SharedFileSet::refcnt, SharedFileSetOnDetach(), SpinLockAcquire, SpinLockRelease, and success.
Referenced by ExecHashJoinInitializeWorker(), and tuplesort_attach_shared().
File SharedFileSetCreate | ( | SharedFileSet * | fileset, |
const char * | name | ||
) |
Definition at line 154 of file sharedfileset.c.
References ChooseTablespace(), MAXPGPATH, PathNameCreateTemporaryDir(), PathNameCreateTemporaryFile(), SharedFilePath(), SharedFileSetPath(), tablespace, and TempTablespacePath().
Referenced by MakeNewSharedSegment().
bool SharedFileSetDelete | ( | SharedFileSet * | fileset, |
const char * | name, | ||
bool | error_on_failure | ||
) |
Definition at line 199 of file sharedfileset.c.
References MAXPGPATH, PathNameDeleteTemporaryFile(), and SharedFilePath().
Referenced by BufFileDeleteShared(), BufFileTruncateShared(), and MakeNewSharedSegment().
void SharedFileSetDeleteAll | ( | SharedFileSet * | fileset | ) |
Definition at line 213 of file sharedfileset.c.
References i, MAXPGPATH, SharedFileSet::ntablespaces, PathNameDeleteTemporaryDir(), SharedFileSetPath(), SharedFileSetUnregister(), and SharedFileSet::tablespaces.
Referenced by ExecHashJoinReInitializeDSM(), SharedFileSetDeleteOnProcExit(), SharedFileSetOnDetach(), stream_cleanup_files(), and subxact_info_write().
void SharedFileSetInit | ( | SharedFileSet * | fileset, |
dsm_segment * | seg | ||
) |
Definition at line 64 of file sharedfileset.c.
References Assert, SharedFileSet::creator_pid, GetTempTablespaces(), i, InvalidOid, lcons(), lengthof, SharedFileSet::mutex, MyDatabaseTableSpace, MyProcPid, NIL, SharedFileSet::ntablespaces, SharedFileSet::number, on_dsm_detach(), on_proc_exit(), PointerGetDatum, PrepareTempTablespaces(), SharedFileSet::refcnt, SharedFileSetDeleteOnProcExit(), SharedFileSetOnDetach(), SpinLockInit, and SharedFileSet::tablespaces.
Referenced by ExecHashJoinInitializeDSM(), stream_open_file(), subxact_info_write(), and tuplesort_initialize_shared().
File SharedFileSetOpen | ( | SharedFileSet * | fileset, |
const char * | name, | ||
int | mode | ||
) |
Definition at line 183 of file sharedfileset.c.
References MAXPGPATH, PathNameOpenTemporaryFile(), and SharedFilePath().
Referenced by BufFileOpenShared().
void SharedFileSetUnregister | ( | SharedFileSet * | input_fileset | ) |
Definition at line 290 of file sharedfileset.c.
References Assert, foreach_delete_current, lfirst, and NIL.
Referenced by SharedFileSetDeleteAll().