On 12/23/2016 01:08 AM, Josef Machytka wrote:
> Hi again.
> So I checked all logs and it turned out one of databases involved vent
> into recovery mode because some of its connections was killed.
> Probably out of memory killer did it. So it caused chain reaction. And
> billing query was canceled "due to administration command" and it was
> shown through dblink as "unknown error".
> Which looked quite horrible...
FYI, I committed a fix for this since the initial report.
Before:
----------
test=# -- kill the remote side manually
test=# select * from dblink('dbname=test','select pg_sleep(30)');
ERROR: unknown error
CONTEXT: Error occurred on dblink connection named "unnamed": could not
execute query.
After:
----------
test=# -- kill the remote side manually
test=# select * from dblink('dbname=test','select pg_sleep(30)');
ERROR: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
CONTEXT: Error occurred on dblink connection named "unnamed": could not
execute query.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development