PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <limits.h>
#include "catalog/pg_tablespace.h"
#include "commands/tablespace.h"
#include "common/file_utils.h"
#include "common/hashfn.h"
#include "miscadmin.h"
#include "storage/ipc.h"
#include "storage/fileset.h"
#include "utils/builtins.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 189 of file fileset.c.
References hash(), hash_any(), name, FileSet::ntablespaces, and FileSet::tablespaces.
Referenced by FilePath(), and FileSetCreate().
|
static |
Definition at line 200 of file fileset.c.
References ChooseTablespace(), FileSetPath(), MAXPGPATH, name, and snprintf.
Referenced by FileSetCreate(), FileSetDelete(), and FileSetOpen().
Definition at line 95 of file fileset.c.
References ChooseTablespace(), FilePath(), FileSetPath(), MAXPGPATH, name, PathNameCreateTemporaryDir(), PathNameCreateTemporaryFile(), tablespace, and TempTablespacePath().
Referenced by MakeNewFileSetSegment().
Definition at line 139 of file fileset.c.
References FilePath(), MAXPGPATH, name, and PathNameDeleteTemporaryFile().
Referenced by BufFileDeleteFileSet(), BufFileTruncateFileSet(), and MakeNewFileSetSegment().
void FileSetDeleteAll | ( | FileSet * | fileset | ) |
Definition at line 153 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 55 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 122 of file fileset.c.
References FilePath(), MAXPGPATH, mode, name, and PathNameOpenTemporaryFile().
Referenced by BufFileOpenFileSet().
Definition at line 175 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().