pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Neto pr <netoprbr9@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: query causes connection termination
Date: Thu, 23 Nov 2017 01:32:20 +0100
Message-ID: <a59bb053-4bbb-fb2c-744a-d08b9be46d1f@2ndquadrant.com> (raw)
In-Reply-To: <CA+TZvYLXHgXVLEZyQK2H=9L0_UqMFENtQZ5tZcot7us_GMDtCA@mail.gmail.com>
References: <CA+TZvYK1wXmOg-4gB3Oem-FHm27U9VvuLKAoFtPcPHSexM+j_Q@mail.gmail.com>
	<CA+TZvYLi2=EZPpA-6hco3Kw5pj2pKxvTEp0dFe24KBUt5GXFsg@mail.gmail.com>
	<CA+TZvYLXHgXVLEZyQK2H=9L0_UqMFENtQZ5tZcot7us_GMDtCA@mail.gmail.com>


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




view thread (5+ messages)  latest in thread

Message-ID: <a59bb053-4bbb-fb2c-744a-d08b9be46d1f@2ndquadrant.com>
Permalink:  ../a59bb053-4bbb-fb2c-744a-d08b9be46d1f@2ndquadrant.com/
Also on:    postgresql.org/message-id/a59bb053-4bbb-fb2c-744a-d08b9be46d1f@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, netoprbr9@gmail.com
  Subject: Re: query causes connection termination
  In-Reply-To: <a59bb053-4bbb-fb2c-744a-d08b9be46d1f@2ndquadrant.com>
  References: <CA+TZvYK1wXmOg-4gB3Oem-FHm27U9VvuLKAoFtPcPHSexM+j_Q@mail.gmail.com> <CA+TZvYLi2=EZPpA-6hco3Kw5pj2pKxvTEp0dFe24KBUt5GXFsg@mail.gmail.com> <CA+TZvYLXHgXVLEZyQK2H=9L0_UqMFENtQZ5tZcot7us_GMDtCA@mail.gmail.com> <a59bb053-4bbb-fb2c-744a-d08b9be46d1f@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox