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:
15
src/include/common/controldata_utils.h
Normal file
15
src/include/common/controldata_utils.h
Normal 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 */
|
Reference in New Issue
Block a user