PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <limits.h>
#include "commands/tablespace.h"
#include "common/file_utils.h"
#include "common/hashfn.h"
#include "miscadmin.h"
#include "storage/fileset.h"
Go to the source code of this file.
Functions | |
static void | FileSetPath (char *path, FileSet *fileset, Oid tablespace) |
static void | FilePath (char *path, FileSet *fileset, const char *name) |
static Oid | ChooseTablespace (const FileSet *fileset, const char *name) |
void | FileSetInit (FileSet *fileset) |
File | FileSetCreate (FileSet *fileset, const char *name) |
File | FileSetOpen (FileSet *fileset, const char *name, int mode) |
bool | FileSetDelete (FileSet *fileset, const char *name, bool error_on_failure) |
void | FileSetDeleteAll (FileSet *fileset) |
Definition at line 186 of file fileset.c.
References hash(), hash_any(), name, FileSet::ntablespaces, and FileSet::tablespaces.
Referenced by FilePath(), and FileSetCreate().
|
static |
Definition at line 197 of file fileset.c.
References ChooseTablespace(), FileSetPath(), MAXPGPATH, name, and snprintf.
Referenced by FileSetCreate(), FileSetDelete(), and FileSetOpen().
Definition at line 92 of file fileset.c.
References ChooseTablespace(), FilePath(), FileSetPath(), MAXPGPATH, name, PathNameCreateTemporaryDir(), PathNameCreateTemporaryFile(), tablespace, and TempTablespacePath().
Referenced by MakeNewFileSetSegment().
bool FileSetDelete | ( | FileSet * | fileset, |
const char * | name, | ||
bool | error_on_failure | ||
) |
Definition at line 136 of file fileset.c.
References FilePath(), MAXPGPATH, name, and PathNameDeleteTemporaryFile().
Referenced by BufFileDeleteFileSet(), BufFileTruncateFileSet(), and MakeNewFileSetSegment().
void FileSetDeleteAll | ( | FileSet * | fileset | ) |
Definition at line 150 of file fileset.c.
References FileSetPath(), i, MAXPGPATH, FileSet::ntablespaces, PathNameDeleteTemporaryDir(), and FileSet::tablespaces.
Referenced by logicalrep_worker_onexit(), SharedFileSetDeleteAll(), and SharedFileSetOnDetach().
void FileSetInit | ( | FileSet * | fileset | ) |
Definition at line 52 of file fileset.c.
References FileSet::creator_pid, GetTempTablespaces(), i, InvalidOid, lengthof, MyDatabaseTableSpace, MyProcPid, FileSet::ntablespaces, FileSet::number, PrepareTempTablespaces(), and FileSet::tablespaces.
Referenced by SharedFileSetInit(), and stream_start_internal().
Definition at line 119 of file fileset.c.
References FilePath(), MAXPGPATH, mode, name, and PathNameOpenTemporaryFile().
Referenced by BufFileOpenFileSet().
Definition at line 172 of file fileset.c.
References FileSet::creator_pid, MAXPGPATH, FileSet::number, PG_TEMP_FILE_PREFIX, snprintf, tablespace, and TempTablespacePath().
Referenced by FilePath(), FileSetCreate(), and FileSetDeleteAll().