Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fO2QE-00030O-IJ for pgsql-general@arkaria.postgresql.org; Wed, 30 May 2018 14:49:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fO2QD-0000kr-FI for pgsql-general@arkaria.postgresql.org; Wed, 30 May 2018 14:49:53 +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.89) (envelope-from ) id 1fO2L5-0005SB-Rk for pgsql-general@lists.postgresql.org; Wed, 30 May 2018 14:44:37 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fO2L1-0000cf-PQ for pgsql-general@lists.postgresql.org; Wed, 30 May 2018 14:44:33 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C0E6621BBC; Wed, 30 May 2018 10:44:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 30 May 2018 10:44:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=uCb0fx1dBwjGXiLrIAQUZCiAWcKhZ b3OsUhl2LKvmZ4=; b=qMUk/PxxT9OCdc/8R9UOhGmZnoDEiZr211mn9yjPGpGNj xUskZ8sQXBVSWetudmg63nBWwbJaMDubcsoML4u9WUyMf/G7i8sIUMGBMj1kCVTJ ePKHK03lz8e5TYNz8mDse9wbHquZ9QDNAdTTtbbAdq+egrDwPALmmzokueflUQH+ t96Zg46WIwRzi+ajZgBz+SVwcX21bs+CmJ1+LAdF9l6TCTWW7feenUXOehmNXqPL QyeKClrC7pUeKr5JJFbHQbRelKS6OUZBmk5k3pzLQ5aOs+oVgD1j18hWN5gWBvNG +1NULaz1/cerWplPnkOthM2R34vu5GxmANjqh1/qQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=uCb0fx 1dBwjGXiLrIAQUZCiAWcKhZb3OsUhl2LKvmZ4=; b=ZR+XSblJKAg6S5Keu2Oug9 6YoXwh2peyMoV7BURmnprVu4M3ymO2KC8iHwhUh53spBN8a0bF962CtcQ9L4VSTx 2NA3oXNsUNLONNsbQkKA5C3595945r+s6Af7KOjVACzmXQ/Sh+7dPa6xu5FuwkIV cnIES/7GPKCkpGlEeQNdZsKI+FqR6h2dp+ssSrmCJ0zV3Zg+KA+u3KabVAXFzvdD 5+S8wycesxUp/i8kYEPHzeAmtbfbwxIy97/wpAya3mmEzgon1vI5j+1iuIbyjpr0 bZbSILTJEHmNfupeNwBy36LTSPBc/HiRGOzIWdf24ZFdbMrymHlR7TpHphFWEG7g == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.159.209]) by mail.messagingengine.com (Postfix) with ESMTPA id 431311025C; Wed, 30 May 2018 10:44:30 -0400 (EDT) Subject: Re: Query running for 12 hours To: =?UTF-8?Q?Yavuz_Selim_Serto=c4=9flu?= Cc: pgsql-general@lists.postgresql.org References: <56911e4e-d8a7-1770-7f6b-cd2104979693@aklaver.com> <7c2c3680-49a7-e6ce-82e1-171ba3e6db43@aklaver.com> From: Adrian Klaver Message-ID: <953ac787-e201-6e92-9536-02bf7015dcad@aklaver.com> Date: Wed, 30 May 2018 07:44:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 05/30/2018 07:41 AM, Yavuz Selim Sertoğlu wrote: > Major upgrade would be very painful because there are many application > running on different servers but same database server. FYI, 9.5.3 --> 9.5.13 is considered a minor upgrade. > Their tests would take too much time. > So I will try to go with minor upgrade. > > Thanks for your help, have a good day. > > > > > Remaining suggestions/questions: > > 1) If it still exists look in Postgres log around  2018-05-30 > 02:00:00, the time the problematic queries started, to see if there > are any entries of note. > > 2) You are on Postgres 9.5.3 and the most recent release 9.5.13. > There have been a lot of bug fixes in the interim and it would be a > good idea to upgrade. It is minor release upgrade but I would go > through the release notes first: > > https://www.postgresql.org/docs/9.5/static/release.html > > > as there some thing that might require your action. > > 3) I suggest 2) because a quick scan of the release notes found this: > > https://www.postgresql.org/docs/9.5/static/release-9-5-11.html > > > " > > Cope with failure to start a parallel worker process (Amit Kapila, > Robert Haas) > > Parallel query previously tended to hang indefinitely if a worker > could not be started, as the result of fork() failure or other > low-probability problems. > " > > Is it possible that parallel query: > > https://www.postgresql.org/docs/10/static/when-can-parallel-query-be-used.html > > > is in use? > > > > > > > >     --     Adrian Klaver > adrian.klaver@aklaver.com > > > > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > > > > -- Adrian Klaver adrian.klaver@aklaver.com