1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Expose control file data via SQL accessible functions.

Add four new SQL accessible functions: pg_control_system(),
pg_control_checkpoint(), pg_control_recovery(), and pg_control_init()
which expose a subset of the control file data.

Along the way move the code to read and validate the control file to
src/common, where it can be shared by the new backend functions
and the original pg_controldata frontend program.

Patch by me, significant input, testing, and review by Michael Paquier.
This commit is contained in:
Joe Conway
2016-03-05 11:10:19 -08:00
parent d34794f7d5
commit dc7d70ea05
11 changed files with 900 additions and 105 deletions

View File

@ -0,0 +1,15 @@
/*
* controldata_utils.h
* Common code for pg_controldata output
*
* Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/common/controldata_utils.h
*/
#ifndef COMMON_CONTROLDATA_UTILS_H
#define COMMON_CONTROLDATA_UTILS_H
extern ControlFileData *get_controlfile(char *DataDir, const char *progname);
#endif /* COMMON_CONTROLDATA_UTILS_H */