Re: Tables(s) that feed pg_controldata - Mailing list pgsql-general

From Tom Lane
Subject Re: Tables(s) that feed pg_controldata
Date
Msg-id 23175.1544452543@sss.pgh.pa.us
Whole thread Raw
In response to Re: Tables(s) that feed pg_controldata  (Ian Barwick <ian.barwick@2ndquadrant.com>)
List pgsql-general
Ian Barwick <ian.barwick@2ndquadrant.com> writes:
> On 12/10/2018 11:50 AM, Michael Paquier wrote:
>> Perhaps.  Even with that, writing an extension for 9.2 would require
>> copy-pasting a lot of code from pg_controldata.c and taking as well the
>> code which has been introduced for the various control functions.
>> Dirty, still doable. 

> I've got some code which does just that to read pg_control as far
> back as 9.3, and it is indeed not pretty ;).

If I had to do this pre-9.6, I'd write a function in an untrusted PL
that invoked pg_controldata and parsed its output.  Ugly, but short
and easy to port across versions.

            regards, tom lane


pgsql-general by date:

Previous
From: Martín Marqués
Date:
Subject: Re: pg_restore fails due to foreign key violation
Next
From: Ron
Date:
Subject: What is the tuplestore?