Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHfRN-0000zT-Pd for pgsql-general@arkaria.postgresql.org; Thu, 23 Nov 2017 00:32:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHfRM-0001Q4-VX for pgsql-general@arkaria.postgresql.org; Thu, 23 Nov 2017 00:32:28 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eHfRM-0001Pk-Gc for pgsql-general@lists.postgresql.org; Thu, 23 Nov 2017 00:32:28 +0000 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eHfRI-0004Nt-R9 for pgsql-general@postgresql.org; Thu, 23 Nov 2017 00:32:26 +0000 Received: by mail-wm0-x234.google.com with SMTP id x63so13386884wmf.4 for ; Wed, 22 Nov 2017 16:32:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=QaJAml3hovnQiFe29Xnng+w8PupkmqD28FcE/Q5ZHKk=; b=rVvZvDrevHd0DWgmvuKn/SmXtC9C5s29IUIon5rhDQ4n9rV5VELC6sLaSsjjGn51Sx DpO8gxdVfiTwH5yF4b+S6VnkC20NzLc9Cc2/UrCuKMxCYc4bsaC1yDa4i8o2zfIqCsSX AqzimnV5uRezeXXx5uXAMrCpxqO2qmhBZ4/9hvEHBtcy3N5gaZ1XclzTlKktAxt2Hrcg 78q+I1+0KO2fKaPV9Bl/edyiXreZy0avCQn7qh3OzZUBOMQm5WlaS+kSWWGFBqjbxPil pi7fkMKN9uZc6e6eZ4K81UKsOfMD9jkloDf/7lnsJ+ARxcYOP3tGW2h4QQPMHHb0kIA/ UXYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QaJAml3hovnQiFe29Xnng+w8PupkmqD28FcE/Q5ZHKk=; b=rskiNga7qZIRo2AcVdw6w1CvNjNUGg9E2l7DpRQmNlUe8uw6dpyRboW1Sh8IO6yHsD twCHXXxH0wAD27dOWqOYdkW+dPMzLHqIhBGtbUNI7tYyREbVRBBrbC0edqhTpx2KQkLF V/EQEb1ZJyQMbgCajOIFHkHrZ8vHvKtm6OMs9Q146NQKT7JpnfxTWB4DZtJvZcF0RuTI Q+z4D4Z59x4xnbATzFGYfyLph4VuTWieNWwRH9hHgYbWlNNwcuq0Rk95yz0dPDwdi3ue u+gEddFdZHWBG2ZGfCGYgKAe5n7vH6DJmg3MC97U2VzETtqadeLa15kYAtXhuOjNhFt6 vykQ== X-Gm-Message-State: AJaThX75+g3Xz4+ZhUZyAxHSSgd8jXQZMuh6xZBrELi7T9Bh1anAn0dI MR2ZTXR0TLu4YmQ5bjHniFQsDmn3a1N6NvxBdRIRctIOm1n7okh22bTrIQrzRCNihS/XyFALNRT hF9PRoSnaiigsMaYDfJznwuG5N8jJEFfPGBcFGO6yASjaiYuCnCW2+RMJDI4leCR3vQb7NoK6je ojTlVQMhwk X-Google-Smtp-Source: AGs4zMZq78xTD48LpSJ8vuVo4my4AdKw9AShcFPxxeYHgoj2nBVPpVEEOV9dpp+BDkjRN7dSRNQZog== X-Received: by 10.28.111.15 with SMTP id k15mr2500134wmc.139.1511397141843; Wed, 22 Nov 2017 16:32:21 -0800 (PST) Received: from [10.137.2.19] (ip-78-102-97-226.net.upcbroadband.cz. [78.102.97.226]) by smtp.gmail.com with ESMTPSA id o135sm3337861wmg.1.2017.11.22.16.32.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2017 16:32:21 -0800 (PST) Subject: Re: query causes connection termination To: Neto pr , pgsql-general@postgresql.org References: From: Tomas Vondra Message-ID: Date: Thu, 23 Nov 2017 01:32:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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