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 1i8PpJ-0003bP-S2 for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Sep 2019 14:12:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i8PpI-0004Dn-Kq for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Sep 2019 14:12:00 +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 1i8PpI-0004DZ-Bm for pgsql-hackers@lists.postgresql.org; Thu, 12 Sep 2019 14:12:00 +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 1i8PpF-0005jW-4H for pgsql-hackers@lists.postgresql.org; Thu, 12 Sep 2019 14:11:59 +0000 Received: by mail-qt1-x841.google.com with SMTP id j10so29683622qtp.8 for ; Thu, 12 Sep 2019 07:11:56 -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=SF8h+XlrYLO+oRSGjA5U9VMlBu4b2BTZuIoJa0Bqq9I=; b=qUpWCRM7y8BWq3L0lBmfDFIrV/cTm2lgW7gZq7lyPFop27FeaPR1TpDtSc82vOsXqo f8bSZblqkOkmjQwrXaKP5BECu5yuFa31ZyHmy79RZaZ0u9XfKAVwhguuRPWzyz2kbvd3 8AzKuKHtQPGtdU+LKAncbI6E0uJFOi9lOgLn4dAj/X3oXsZTWczXNBuPolCR9e39Z5Vb YKWvsi9+lo3IiZ8jpAlntNMk2JhjZnya4Gcy1bngwf/bVIZPjr3uYgJXAJRCvuru4Nqt gYFhZtKWfJWOE64ggKf8gqHkWyEOUHFXytad0pbZNv82cMU0NX/1D5CfkUhx4pBC1XED Mi5g== 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=SF8h+XlrYLO+oRSGjA5U9VMlBu4b2BTZuIoJa0Bqq9I=; b=nNi4eamngdAMHZBLMUj+jV1+wlH/TE3mJbKSc4k3bhGgCQU1KRgh8cZP/ONTmzThsr vu/ZOmcbQRnauq4xHYf9jbKRe6pjHrdc4i7WQT2ziM4TM3C5MTDFrZ4xkc0j49VqZLg8 0Uk2t/2R5VtP7PA23DJoVfjvcmOXJ4h/9cMd7x8/QHtcm6lciJLoj7u4bWFZ20C9Wrky QKAGDk7Yb2YXr7LV+00mTvVhibCgM8PsGs1V0Ye8/28Xor6oPJro9KdrKLHRz9mUU1We U7a3f9+3s2+7zejmxC0enFCOm+6ADe5tvsPjcJMAaBQWMkpApJ0ZbC+CntLQTMwYJ8ER 8g8w== X-Gm-Message-State: APjAAAVvYxApi0op+cg62H02YbWQI6ub9FdmqAj5Szl6zXVLX3ACyDs+ JZnxc4dJuMHYljgH8esR9LJvOg== X-Google-Smtp-Source: APXvYqyHwfGPNxLMEV4wsAMbaP1zawCS5f6uWVbzXScWhcCc2jdbptiY6QiC6tMOd0trnFuYazUnSQ== X-Received: by 2002:ac8:2bc4:: with SMTP id n4mr8634261qtn.298.1568297515598; Thu, 12 Sep 2019 07:11:55 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([179.56.30.174]) by smtp.gmail.com with ESMTPSA id h7sm8657365qto.16.2019.09.12.07.11.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2019 07:11:55 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 539FE12090A; Thu, 12 Sep 2019 11:11:53 -0300 (-03) Date: Thu, 12 Sep 2019 11:11:53 -0300 From: Alvaro Herrera To: Tom Lane Cc: David Rowley , Amit Langote , Yuzuko Hosoya , PostgreSQL Hackers Subject: Re: Runtime pruning problem Message-ID: <20190912141153.GA31190@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8056.1564527407@sss.pgh.pa.us> 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-Jul-30, Tom Lane wrote: > I wrote: > > This may be arguing for a change in ruleutils' existing behavior, > > not sure. But when dealing with traditional-style inheritance, > > I've always thought that Vars above the Append were referring to > > the parent rel in its capacity as the parent, not in its capacity > > as the first child. With new-style partitioning drawing a clear > > distinction between the parent and all its children, it's easier > > to understand the difference. > > OK, so experimenting, I see that it is a change: [...] > The portion of this below the Append is fine, but I argue that > the Vars above the Append should say "part", not "part_p1". > In that way they'd look the same regardless of which partitions > have been pruned or not. So is anyone working on a patch to use this approach? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services