Re: pg_controldata gobbledygook - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_controldata gobbledygook
Date
Msg-id 672.1366950894@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_controldata gobbledygook  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: pg_controldata gobbledygook
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.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 writepg_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



pgsql-hackers by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: pg_controldata gobbledygook
Next
From: Amit Langote
Date:
Subject: Re: Failing start-up archive recovery at Standby mode in PG9.2.4