BUG #11455: PQerrorMessage not reset after PQreset - Mailing list pgsql-bugs

From postgresql-bklyn@sneakemail.com
Subject BUG #11455: PQerrorMessage not reset after PQreset
Date
Msg-id 20140919165702.2558.6058@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #11455: PQerrorMessage not reset after PQreset
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      11455
Logged by:          Caleb Epstein
Email address:      postgresql-bklyn@sneakemail.com
PostgreSQL version: 9.3.4
Operating system:   Linux
Description:

I'm testing application logic to reconnect to my database server after a
connection failure.  I'm using PQreset() and I notice that the
PQerrorMessage() result keeps growing after each failed reconnect.

For example, see belwo.  My application log messages start with "Database".
The "... Resetting" message is followed by a call to PQreset().  The "FATAL"
messages are the strings returned to be by PQerrorMessage.

Database connection failed.  Resetting.
Database reconnect failed: FATAL:  terminating connection due to
administrator command
FATAL:  terminating connection due to administrator command
FATAL:  the database system is shutting down
Database connection unavailable.  Cannot persist
Database connection failed.  Resetting.
Database reconnect failed: FATAL:  terminating connection due to
administrator command
FATAL:  terminating connection due to administrator command
FATAL:  the database system is shutting down
FATAL:  the database system is shutting down

The next error will have 3 instances of "system is shutting down", and so
on.

Thanks!

pgsql-bugs by date:

Previous
From: matthew.vita@fractureme.com
Date:
Subject: BUG #11454: plperl apt problem
Next
From: Tom Lane
Date:
Subject: Re: BUG #11455: PQerrorMessage not reset after PQreset