pgsql: Expose control file data via SQL accessible functions.

From: Joe Conway <mail(at)joeconway(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Expose control file data via SQL accessible functions.
Date: 2016-03-05 19:11:09
Message-ID: E1acHbZ-0003Jz-Vb@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/dc7d70ea05deca9dfc6a25043d406b57cc8f6c30

Modified Files
--------------
doc/src/sgml/func.sgml | 356 ++++++++++++++++++++++++++++++++
src/backend/utils/misc/Makefile | 2 +-
src/backend/utils/misc/pg_controldata.c | 341 ++++++++++++++++++++++++++++++
src/bin/pg_controldata/pg_controldata.c | 162 ++++++---------
src/common/Makefile | 4 +-
src/common/controldata_utils.c | 100 +++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 13 ++
src/include/common/controldata_utils.h | 15 ++
src/include/utils/builtins.h | 6 +
src/tools/msvc/Mkvcbuild.pm | 4 +-
11 files changed, 900 insertions(+), 105 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2016-03-06 02:16:47 pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi
Previous Message Fujii Masao 2016-03-05 17:44:50 pgsql: Ignore recovery_min_apply_delay until recovery has reached consi