Expose control file data via SQL accessible functions.
Joe Conway <mail@joeconway.com>
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.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +356 −0 |
| src/backend/utils/misc/Makefile | modified | +1 −1 |
| src/backend/utils/misc/pg_controldata.c | added | +341 −0 |
| src/bin/pg_controldata/pg_controldata.c | modified | +63 −99 |
| src/common/controldata_utils.c | added | +100 −0 |
| src/common/Makefile | modified | +2 −2 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.h | modified | +13 −0 |
| src/include/common/controldata_utils.h | added | +15 −0 |
| src/include/utils/builtins.h | modified | +6 −0 |
| src/tools/msvc/Mkvcbuild.pm | modified | +2 −2 |