pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: pgsql-committers@postgresql.org
Subject: pgsql: Expose control file data via SQL accessible functions.
Date: Sat, 05 Mar 2016 19:11:09 +0000
Message-ID: <E1acHbZ-0003Jz-Vb@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1acHbZ-0003Jz-Vb@gemulon.postgresql.org>
Permalink:  ../E1acHbZ-0003Jz-Vb@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1acHbZ-0003Jz-Vb@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: mail@joeconway.com
  Subject: Re: pgsql: Expose control file data via SQL accessible functions.
  In-Reply-To: <E1acHbZ-0003Jz-Vb@gemulon.postgresql.org>
  References: <E1acHbZ-0003Jz-Vb@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox