Re: Tables(s) that feed pg_controldata

From: Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Tables(s) that feed pg_controldata
Date: 2018-12-10 01:51:26
Message-ID: b9e0e7ca-25f8-f659-d904-4a01e4c25015@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/09/2018 01:25 AM, Ron wrote:
>
> In v9.2 (yes, I know it's EOL; there's nothing I can do about it), what tables
> do I query to get these values, and can I also get them from the streamed
> replication host?
>
> - Database cluster state
> - Latest checkpoint location
> - Time of latest checkpoint

The pg_control file is written directly by PostgreSQL, it does not derive from
any tables.

From 9.6 there are a bunch of functions which will report values contained in
pg_controldata:

https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-CONTROLDATA

but you're out of luck for 9.2. The only option to query the desired values via
SQL would be to write an extension which reads pg_controldata
(possibly as a backport of the above-mentioned functions).

Regards

Ian Barwick

--
Ian Barwick http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2018-12-10 02:10:57 Re: Tables(s) that feed pg_controldata
Previous Message Mike Lissner 2018-12-10 01:48:53 Re: Errors with schema migration and logical replication — expected?