Re: pg_basebackup: Missing newlines in some error messages - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pg_basebackup: Missing newlines in some error messages
Date
Msg-id 20180321131748.vq7crss7chyt5uy2@alvherre.pgsql
Whole thread Raw
In response to Re: pg_basebackup: Missing newlines in some error messages  (Michael Banck <michael.banck@credativ.de>)
List pgsql-hackers
Michael Banck wrote:
> Hi,
> 
> Am Mittwoch, den 21.03.2018, 09:54 -0300 schrieb Alvaro Herrera:
> > Michael Banck wrote:
> > > I apparently managed to screw up so badly that no PQerrorMessage was
> > > set, so saw the above (which indeed has no error message after the
> > > colon).
> > 
> > Well, maybe that's a different bug, then: maybe we should print
> > something other than PQerrorMessage (or maybe PQerrorMessage should not
> > return empty!).  Can you reproduce the problem?
> 
> It was while I was hacking on the code and mistyped something, so I
> think this is entirely my fault and not a valid concern. From what I
> could tell, I got PGRES_FATAL_ERROR back (I printed the int value, which
> was 7), so that could explain why there was no PQerrorMessage?

If the PGresult passed to PQerrorMessage was NULL, then there's nowhere
to stuff a fabricated error message either, so it all sounds good to me.

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


pgsql-hackers by date:

Previous
From: Michael Banck
Date:
Subject: pg_basebackup: Allow setting replication slots in recovery.confeven if wal-method is none
Next
From: Jaime Soler
Date:
Subject: Re: Hash join in SELECT target list expression keeps consuming memory