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 1hw65R-00011P-EN for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2019 14:41:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hw65Q-00015E-Ai for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2019 14:41:44 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hw65P-00012p-St for pgsql-hackers@lists.postgresql.org; Fri, 09 Aug 2019 14:41:44 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hw65M-0006XN-Uv for pgsql-hackers@lists.postgresql.org; Fri, 09 Aug 2019 14:41:43 +0000 Received: by mail-qt1-x841.google.com with SMTP id a15so95951978qtn.7 for ; Fri, 09 Aug 2019 07:41: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=GRlD9803/0PExRY8k8gBZ3SChvlQyGAWIlonP+M9pyA=; b=cE1PUyfQDv3R0NacdAadS5wuMliQWVykFSaTc6bOViJix6povsoFtU1cSUlU030Qez 0c9StRvobgu0N3I9m8smtgioE3nOJGY8/HEJVcj2e6P3qJNNLL3GCRj42U1HFbM1epoj edEAL0ps8Xb9NZoHxOmsjhdX2pyUvOfnR8/kBY25pKnnJcAvfWrb8q3Cm76onNvjorWi uTIw3ESKalqao6FQKNblVpySCiEWDqryFjHz2bSiORgYZy4gXEnRatZ1rd7JXWu14h2a Yzd2ktSiHt3dhmBvJXvL4JgvKUq8wHj7oxk0eG49/kAxNzm338ZnI1Z4lCycCMoKff38 /FsA== 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=GRlD9803/0PExRY8k8gBZ3SChvlQyGAWIlonP+M9pyA=; b=FGWqJFuuKgrDbFDxe53KFsFfjAZGqsGdBKviwg9AwI7Blem22IB8PcPWhPmR2DwySv WFxhufLjzqo5maK5kr0prDzRNtEWYR74XEFypYa+HYin15QabxK/UDfsRPAlQbMANbaF MhyNq/4HYyJMh9mVUMca9nKm/cV/NCbO0ZTgFjPHJIosadHgpNtG198NPfNCFuiuVxxb 0KgruI/ITFcay8QRZt2VS0HByKSrrvUP4ipPsK67KvqHPUmwbmkk58Q9PErf4/wK8VNy rua/2mxWIRWvJ3kijfFCB6JY4p9iKiEGe1g+8l5WRwm1DTTZpFG8y1cJSeOwkLrHgNRv J7UQ== X-Gm-Message-State: APjAAAW35rQmygtibMPvBwas8jj1Oqs3EpeXZ3kn1b1WF37sRxGRaxrL k4Cg85gNhCkeYVNvtVguPVxJBQ== X-Google-Smtp-Source: APXvYqxG9sks35/c7J+ZgypzZCCIYplXTtIMHs606qWeQO2sTKgrZ/I34j2C7bDGLnoAZVxUjGI5DQ== X-Received: by 2002:ac8:25c2:: with SMTP id f2mr18566787qtf.164.1565361698664; Fri, 09 Aug 2019 07:41:38 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([177.154.145.99]) by smtp.gmail.com with ESMTPSA id y5sm5112579qkj.64.2019.08.09.07.41.37 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 09 Aug 2019 07:41:38 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 0FBFB120D2C; Fri, 9 Aug 2019 10:41:34 -0400 (-04) Date: Fri, 9 Aug 2019 10:41:34 -0400 From: Alvaro Herrera To: Amit Langote Cc: Kyotaro Horiguchi , Simon Riggs , yuzuko , shawn wang , Shawn Wang , PostgreSQL Hackers Subject: Re: Problem with default partition pruning Message-ID: <20190809144134.GA25273@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-Aug-09, Amit Langote wrote: > Hmm, oops. I think that judgement was a bit too rushed on my part. I > unintentionally ended up making the partition constraint to *always* > be fetched, whereas we don't need it in most cases. I've reverted > that change. Yeah, I was quite confused about this point yesterday while I was trying to make sense of your patches. > RelOptInfo.partition_qual is poorly named in retrospect. > :( It's not set for all partitions, only those that are partitioned > themselves. Oh. Hmm, I think this realization further clarifies things. Since we're only changing this in the master branch anyway, maybe we can find a better name for it. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services