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 1fUv1B-000744-A8 for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jun 2018 14:20:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fUv19-0004oE-E0 for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jun 2018 14:20:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fUv19-0004nu-6u for pgsql-hackers@lists.postgresql.org; Mon, 18 Jun 2018 14:20:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fUv15-0008EO-Gr for pgsql-hackers@lists.postgresql.org; Mon, 18 Jun 2018 14:20:26 +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 w5IEKJ5g012844; Mon, 18 Jun 2018 10:20:19 -0400 From: Tom Lane To: Amit Kapila cc: Andrew Gierth , Maksim Milyutin , PostgreSQL Hackers Subject: Re: Slow planning time for simple query In-reply-to: References: <36adf760-680b-7a4a-e019-64f4eaaf6ff7@gmail.com> <9661.1528573749@sss.pgh.pa.us> <87po0pr97m.fsf@news-spur.riddles.org.uk> <7067.1529246768@sss.pgh.pa.us> <87lgbdquul.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Amit Kapila message dated "Mon, 18 Jun 2018 17:41:01 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12842.1529331619.1@sss.pgh.pa.us> Date: Mon, 18 Jun 2018 10:20:19 -0400 Message-ID: <12843.1529331619@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Kapila writes: > On Sun, Jun 17, 2018 at 9:22 PM, Andrew Gierth > wrote: >> That's OK as long as we're ignoring those hints on the standby. > What if we don't ignore those hints on standby for a specific case > like the one in get_actual_variable_range? Yeah, that's the same idea I suggested upthread. Andrew shot down my first thought (correctly I think) but the second one still seems feasible. > Now, if the user has > enabled wal_log_hints on the master, it could save time from scanning > many dead tuples on standby. We should have the standby set the hint bits for itself, rather than relying on wal_log_hints. regards, tom lane