Re: Idea: closing the loop for "pg_ctl reload" - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Idea: closing the loop for "pg_ctl reload"
Date
Msg-id 20150304220402.GQ3291@alvh.no-ip.org
Whole thread Raw
In response to Re: Idea: closing the loop for "pg_ctl reload"  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Idea: closing the loop for "pg_ctl reload"  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Peter Eisentraut wrote:
> On 3/3/15 7:34 PM, Jim Nasby wrote:
> > Definitely no multi-line. If we keep that restriction, couldn't we just
> > dedicate one entire line to the error message? ISTM that would be safe.
> 
> But we have multiline error messages.  If we put only the first line in
> the pid file, then all the tools that build on this will effectively
> show users truncated information, which won't be a good experience.  If
> we don't put any error message in there, then users or tools will be
> more likely to look up the full message somewhere else.

Would it work to have it be multiline using here-doc syntax?  It could
be printed similarly to what psql does to error messages, with a prefix
in front of each component (ERROR, STATEMENT, etc) and a leading tab for
continuation lines.  The last line is a terminator that matches
something specified in the first error line.  This becomes pretty
complicated for a PID file, mind you.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: xpath changes in the recent back branches
Next
From: Stephen Frost
Date:
Subject: Re: MD5 authentication needs help