Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecL9R-00032Q-RN for pgsql-general@arkaria.postgresql.org; Fri, 19 Jan 2018 01:07:25 +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 1ecL9R-0008DN-8m for pgsql-general@arkaria.postgresql.org; Fri, 19 Jan 2018 01:07:25 +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 1ecL9Q-0008DD-Ty for pgsql-general@lists.postgresql.org; Fri, 19 Jan 2018 01:07:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ecL9N-0002AG-J2 for pgsql-general@postgresql.org; Fri, 19 Jan 2018 01:07:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w0J17IgJ007995; Thu, 18 Jan 2018 20:07:19 -0500 From: Tom Lane To: Paul Jones cc: Pgsql-general General Subject: Re: Possible hang in 10.1 with JSON query over partially indexed partitions In-reply-to: <852006162.725231.1516302046887@mail.yahoo.com> References: <852006162.725231.1516302046887.ref@mail.yahoo.com> <852006162.725231.1516302046887@mail.yahoo.com> Comments: In-reply-to Paul Jones message dated "Thu, 18 Jan 2018 19:00:46 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7993.1516324038.1@sss.pgh.pa.us> Date: Thu, 18 Jan 2018 20:07:18 -0500 Message-ID: <7994.1516324038@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Paul Jones writes: > I may have discovered a situation in 10.1 where EXECUTEing a PREPARED > statement acting on JSON data in partitioned tables hangs in an > infinite loop for a particular set of data. Unfortunately, the data is > proprietary, so I did the best I could below to describe what happened. You haven't provided any real reason to think that this represents an infinite loop and not just a really slow query. The query's filter conditions are complex enough to render the planner's estimates basically works of fiction :-(, so I have no faith in the estimates suggesting that only a relatively small number of rows will get processed. It's definitely making some progress, because your successive backtraces show different blocks getting read. regards, tom lane