PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <unistd.h>
#include "common/relpath.h"
#include "postmaster/startup.h"
#include "storage/copydir.h"
#include "storage/fd.h"
#include "storage/reinit.h"
#include "utils/hsearch.h"
#include "utils/memutils.h"
Go to the source code of this file.
Data Structures | |
struct | unlogged_relation_entry |
Functions | |
static void | ResetUnloggedRelationsInTablespaceDir (const char *tsdirname, int op) |
static void | ResetUnloggedRelationsInDbspaceDir (const char *dbspacedirname, int op) |
void | ResetUnloggedRelations (int op) |
bool | parse_filename_for_nontemp_relation (const char *name, RelFileNumber *relnumber, ForkNumber *fork, unsigned *segno) |
bool parse_filename_for_nontemp_relation | ( | const char * | name, |
RelFileNumber * | relnumber, | ||
ForkNumber * | fork, | ||
unsigned * | segno | ||
) |
Definition at line 380 of file reinit.c.
References forkname_chars(), InvalidForkNumber, InvalidRelFileNumber, MAIN_FORKNUM, name, and PG_UINT32_MAX.
Referenced by ResetUnloggedRelationsInDbspaceDir(), and sendDir().
void ResetUnloggedRelations | ( | int | op | ) |
Definition at line 47 of file reinit.c.
References AllocateDir(), ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, begin_startup_progress_phase(), CurrentMemoryContext, dirent::d_name, DEBUG1, elog, FreeDir(), MAXPGPATH, MemoryContextDelete(), MemoryContextSwitchTo(), PG_TBLSPC_DIR, ReadDir(), ResetUnloggedRelationsInTablespaceDir(), snprintf, TABLESPACE_VERSION_DIRECTORY, UNLOGGED_RELATION_CLEANUP, and UNLOGGED_RELATION_INIT.
Referenced by StartupXLOG().
|
static |
Definition at line 161 of file reinit.c.
References AllocateDir(), Assert, copy_file(), ctl, CurrentMemoryContext, dirent::d_name, DEBUG2, dstpath, elog, ereport, errcode_for_file_access(), errmsg(), ERROR, FreeDir(), fsync_fname(), hash(), HASH_BLOBS, HASH_CONTEXT, hash_create(), hash_destroy(), HASH_ELEM, HASH_ENTER, HASH_FIND, hash_get_num_entries(), hash_search(), INIT_FORKNUM, MAXPGPATH, parse_filename_for_nontemp_relation(), ReadDir(), unlogged_relation_entry::relnumber, snprintf, UNLOGGED_RELATION_CLEANUP, and UNLOGGED_RELATION_INIT.
Referenced by ResetUnloggedRelationsInTablespaceDir().
|
static |
Definition at line 106 of file reinit.c.
References AllocateDir(), dirent::d_name, ereport, ereport_startup_progress, errcode_for_file_access(), errmsg(), FreeDir(), LOG, MAXPGPATH, ReadDir(), ResetUnloggedRelationsInDbspaceDir(), snprintf, UNLOGGED_RELATION_CLEANUP, and UNLOGGED_RELATION_INIT.
Referenced by ResetUnloggedRelations().