Re: Tables(s) that feed pg_controldata

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, 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 14:35:43
Message-ID: 23175.1544452543@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2018-12-10 15:56:05 What is the tuplestore?
Previous Message Martín Marqués 2018-12-10 13:56:03 Re: pg_restore fails due to foreign key violation