Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eiMNz-0007Q8-Cr for pgsql-performance@arkaria.postgresql.org; Sun, 04 Feb 2018 15:39:19 +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 1eiMNy-0007UW-56 for pgsql-performance@arkaria.postgresql.org; Sun, 04 Feb 2018 15:39:18 +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 1eiMNx-0007UN-RQ for pgsql-performance@lists.postgresql.org; Sun, 04 Feb 2018 15:39:17 +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 1eiMNv-0001ty-FI for pgsql-performance@lists.postgresql.org; Sun, 04 Feb 2018 15:39:16 +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 w14FdBcM015593; Sun, 4 Feb 2018 10:39:11 -0500 From: Tom Lane To: Mariel Cherkassky cc: Andreas Kretschmer , pgsql-performance@lists.postgresql.org Subject: Re: postgresql 10.1 wrong plan in when using partitions bug In-reply-to: References: Comments: In-reply-to Mariel Cherkassky message dated "Sun, 04 Feb 2018 17:06:38 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15591.1517758751.1@sss.pgh.pa.us> Date: Sun, 04 Feb 2018 10:39:11 -0500 Message-ID: <15592.1517758751@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Mariel Cherkassky writes: > Great, it solved the issue. Seems problematic that the planner do full > scans on all partitions in the first case isnt it ? Seems like a bug ? to_date isn't an immutable function (it depends on timezone and possibly some other GUC settings). So there's a limited amount that the planner can do with it. regards, tom lane