Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hfFvU-0001WS-29 for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jun 2019 03:45:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hfFvQ-0002EE-HX for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jun 2019 03:45:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hfFvQ-00026G-4S for pgsql-hackers@lists.postgresql.org; Mon, 24 Jun 2019 03:45:48 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hfFvI-0001fN-Ry for pgsql-hackers@lists.postgresql.org; Mon, 24 Jun 2019 03:45:46 +0000 Received: by mail-qk1-x743.google.com with SMTP id c70so8729258qkg.7 for ; Sun, 23 Jun 2019 20:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=sAMCG2T2nQeOZpSNmsOX4WmXdFZThQNOMnbz0+HB2KQ=; b=E8a4Teq+royl+vZV7TdUNjXiO/kfpfUhaSbHoSxvHxjr80sc8zLgcu2M+FE+10jnE4 LNH5ot3j8ICVTnzmF6UdH2HoCmjzDczsOfO96EwUg+N0fFf3AXBIxqZ5s4UHlSFy3o5x bl0bZLhOs5XYeeqSGn+ga3DgzPpQUKdMf7ze6porqUI08IKdCpHJ+cMi5nZFtdR502/I 9QQRJB7ENKcWzT6gkrZnvSsvAyjXhZWBbR/dfUdFFTUdwngYxBxUwwbiqAeef93YaVYa CqKAlsAQuW7NOw3CLrXGV4KKdv3Q44pziLBiNJwq0f9Lxiwb5dV8WiWV3DM3TA8dt/ME SQWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=sAMCG2T2nQeOZpSNmsOX4WmXdFZThQNOMnbz0+HB2KQ=; b=SEM8WNX39m/9YRuJBx6mItH/I2g1iWti8XEimvP/+yd4qJZfYCBLIM6AcLM56Xk+Bk u2kuLLZDslpNcAq6YCNPe+C3aO/dSarUs8+mwMkYfqyRLUnzIjp5Hfe715Gi10gLAtjN B4QZsfOi9qeaqA6JUO/wK/0fZ6Et54dzrp5PUT85oRdVBjhq9iB01VNS6EQVz5toDOKZ +GaRIYlM5ZsJUoZj+1lsvdZpdE9ft2SiUvanX+DWnCGxq46OxpCoN0VwysdwcVY91isn kmPEUCqOVcb7CODlpoihlnybmEXcLkibCkPWeTUYnzcb+wcEFMyRPgywrhp0mepET9nc lTjA== X-Gm-Message-State: APjAAAWYXzQOCK3nPcWAXxNY1VwvGG6zHcsUnLJ+okwQ4wWH4jeAbQPl CO/UiDZn/OjKoTZlPvOISBQzKw== X-Google-Smtp-Source: APXvYqwzQ7CeJFpjaetXSyvSoxkigxpWVUTPtehM3QBe123BEiJoVMF5yNkj1O+vjHfFqsn+0MQxuQ== X-Received: by 2002:ae9:ee0b:: with SMTP id i11mr14818247qkg.424.1561347939840; Sun, 23 Jun 2019 20:45:39 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([179.56.49.109]) by smtp.gmail.com with ESMTPSA id q9sm4660977qtn.86.2019.06.23.20.45.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 23 Jun 2019 20:45:39 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id DE4BC120373; Sun, 23 Jun 2019 23:45:37 -0400 (-04) Date: Sun, 23 Jun 2019 23:45:37 -0400 From: Alvaro Herrera To: shawn wang Cc: Shawn Wang , pgsql-hackers@lists.postgresql.org, Yuzuko Hosoya Subject: Re: Problem with default partition pruning Message-ID: <20190624034537.GA21833@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jun-24, shawn wang wrote: Hello, > Thank you for your reply. > You can see that the mail start time is February 22. So I looked at the > latest version at that time. I found that v11.2 was the newest branch at > the time. So I tried to merge this patch into the code, and I found that > everything worked. I see -- I only tried master, didn't occur to me to try it against REL_11_STABLE. > So I tested on this branch and got the results. > You need to add the v4_default_partition_pruning.patch > > first, > and then add the > v3_ignore_contradictory_where_clauses_at_partprune_step.patch > Oh, so there are two patches? It's easier to keep track if they're always posted together. Anyway, I may have some time to have a look tomorrow (Monday). -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services