Re: query causes connection termination - Mailing list pgsql-general

From Tomas Vondra
Subject Re: query causes connection termination
Date
Msg-id a59bb053-4bbb-fb2c-744a-d08b9be46d1f@2ndquadrant.com
Whole thread Raw
In response to Re: query causes connection termination  (Neto pr <netoprbr9@gmail.com>)
Responses Re: query causes connection termination
List pgsql-general
On 11/23/2017 01:25 AM, Neto pr wrote:
> Another fact is that when executing the query without the command
> EXPLAIN ANALYZE, the result is usually returned after a few minutes.
> I do not understand, because when using the EXPLAIN ANALYZE command the
> dbms closes the connection. 
> Anyone have any tips on why this occurs?
> 

Attach gdb to the backend, run the query and when it fails get us the
backtrace. So something like

1) select pg_backend_pid()

2) gdb -p $PID

3) run the EXPLAIN ANALYZE again

4) watch the gdb session, when it fails do 'bt'

You need to install debuginfo first, so that the backtrace makes sense.


regards

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


pgsql-general by date:

Previous
From: Neto pr
Date:
Subject: Re: query causes connection termination
Next
From: Tom Lane
Date:
Subject: Re: backends stuck in "startup"