Re: query causes connection termination

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Neto pr <netoprbr9(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: query causes connection termination
Date: 2017-11-23 00:32:20
Message-ID: a59bb053-4bbb-fb2c-744a-d08b9be46d1f@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-11-23 00:43:50 Re: backends stuck in "startup"
Previous Message Neto pr 2017-11-23 00:25:55 Re: query causes connection termination