Re: Idea: closing the loop for "pg_ctl reload"

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>, Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Idea: closing the loop for "pg_ctl reload"
Date: 2015-03-04 22:04:02
Message-ID: 20150304220402.GQ3291@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-03-04 22:04:37 Re: MD5 authentication needs help
Previous Message Robert Haas 2015-03-04 22:00:20 Re: xpath changes in the recent back branches