Re: machine-readable pg_controldata?

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: machine-readable pg_controldata?
Date: 2010-03-04 21:54:15
Message-ID: 9837222c1003041354v19e7b451xd823e4a8a7489d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/3/4 Josh Berkus <josh(at)agliodbs(dot)com>:
> All,
>
> Currently, the only way for admin scripts to get individual data items
> out of pg_controldata (such as the next XID or the catalog version) is
> via grep and regex. Given that people are going to be relying on some of
> this data for replication admin in the future, it seems past time to
> have a form of pg_controldata which either outputs machine-readable text
> (XML or JSON), or (my preference) takes options to output just the
> invididual items, e.g.

Huh? It's fixed with, you don't need regexps for that. Just split the
string apart.

Taking options for single fields might have a better usecase, of course :-)

> pg_controldata --catalog_version
>
> Even better would be the ability to get everything which is in
> pg_controldata currently as part of a system view in a running
> PostgreSQL; I can get most of them, but certainly not all.

+1 for having all the information available from inside the backend,
if that's technically possible (which I assume it should be)

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-03-04 22:00:24 Explicit psqlrc
Previous Message Josh Berkus 2010-03-04 20:52:03 machine-readable pg_controldata?