PostgreSQL Source Code
git master
|
#include "catalog/pg_control.h"
Go to the source code of this file.
Functions | |
ControlFileData * | get_controlfile (const char *DataDir, bool *crc_ok_p) |
void | update_controlfile (const char *DataDir, ControlFileData *ControlFile, bool do_sync) |
ControlFileData* get_controlfile | ( | const char * | DataDir, |
bool * | crc_ok_p | ||
) |
Definition at line 52 of file controldata_utils.c.
References _, Assert(), close, CloseTransientFile(), COMP_CRC32C, ControlFile, ControlFileData::crc, crc, DataDir, elog(), EQ_CRC32C, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errcode_for_file_access(), errmsg(), ERROR, fd(), FIN_CRC32C, INIT_CRC32C, MAXPGPATH, OpenTransientFile(), palloc_object, PG_BINARY, ControlFileData::pg_control_version, pg_fatal, pg_log_warning, read, and snprintf.
Referenced by get_control_dbstate(), main(), pg_control_checkpoint(), pg_control_init(), pg_control_recovery(), and pg_control_system().
void update_controlfile | ( | const char * | DataDir, |
ControlFileData * | ControlFile, | ||
bool | do_sync | ||
) |
Definition at line 145 of file controldata_utils.c.
References BasicOpenFile(), close, COMP_CRC32C, ControlFile, ControlFileData::crc, crc, DataDir, do_sync, ereport, errcode_for_file_access(), errmsg(), fd(), FIN_CRC32C, fsync, INIT_CRC32C, MAXPGPATH, PANIC, PG_BINARY, PG_CONTROL_FILE_SIZE, pg_fatal, pg_file_create_mode, pg_fsync(), pgstat_report_wait_end(), pgstat_report_wait_start(), snprintf, ControlFileData::time, write, and XLOG_CONTROL_FILE.
Referenced by main(), perform_rewind(), RewriteControlFile(), and UpdateControlFile().