Re: pg_controldata gobbledygook

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_controldata gobbledygook
Date: 2013-04-26 04:34:54
Message-ID: 672.1366950894@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> Tom Lane wrote:
>> I think I've heard of scripts grepping the output of pg_controldata for
>> this that or the other. Any rewording of the labels would break that.
>> While I'm not opposed to improving the labels, I would vote against your
>> second, abbreviated scheme because it would make things ambiguous for
>> simple grep-based scripts.

> We could provide two alternative outputs, one for human consumption with
> the proposed format and something else that uses, say, shell assignment
> syntax. (I did propose this years ago and I might have an unfinished
> patch still lingering about somewhere.)

And a script would use that how? "pg_controldata --machine-friendly"
would fail outright on older versions. I think it's okay to ask script
writers to write
pg_controldata | grep -e 'old label|new label'
but not okay to ask them to deal with anything as complicated as trying
a switch to see if it works or not.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2013-04-26 04:46:11 Re: Failing start-up archive recovery at Standby mode in PG9.2.4
Previous Message Fabrízio de Royes Mello 2013-04-26 04:25:40 Re: pg_controldata gobbledygook