Ian Barwick <ian.barwick@xxxxxxxxxxxxxxx> 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