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 1faOH1-0006Ub-RD for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jul 2018 16:35:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1faOGz-00079t-Lp for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jul 2018 16:35:25 +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.89) (envelope-from ) id 1faOGz-00079P-Bd for pgsql-hackers@lists.postgresql.org; Tue, 03 Jul 2018 16:35:25 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1faOGw-0004yv-M2 for pgsql-hackers@postgresql.org; Tue, 03 Jul 2018 16:35:23 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1A8F121D2B; Tue, 3 Jul 2018 12:35:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 03 Jul 2018 12:35:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=trEtiMAhQiijC5oUn/sBTBXuTrckUdrk0BtE5ALXzUM=; b=ecOEE/P2 UqqDjurt5shTJ4C+5GR0aAxUTEXu0aPIextvTUxoU8FxuyHYKBT1teNVMqh46TgA SI3D49FTgvgCwWAGKusitmmbaFLz5ZPVVTY9xTDolOm9ifCEPNfaRcedRAbxPGGc OvWgChFEdcdhXTSeq7giuXgUcEF9YGL1WMQB6Rq5/UUxA4VIvN8NoE9da04qWpyD WJjmzZgeUZwf6lMEZRjuDMhF4DMtFwOfhiLtFgbpMa5wRCPVEHeyr8WhNZn5UTV9 7LjzXnqsYNOoy+AlVp+F4gOGhV5kwzcNdyeoyWyeiiD0SL8iq1lhKZ3AHOHNJdIP 3USMkV+pAvhX0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=trEtiMAhQiijC5oUn/sBTBXuTrckU drk0BtE5ALXzUM=; b=O3yzPB11PcdLMnGI3/Qfgj6gTqDkx1w+aS3L0jS4epj2z Hhkr5q00bVSgTwOClRKAD2NYWya7QeREZ/SaKuytLqPOvn7wpeiEer+R04I01oRO INAbpUEqKl2vrDt4kjcvU98L41vJPqmmk8khP3w22TgO92e59jb5jakLqkZtrmJG 3jcGIxUdG7HR7fhqpCnK7lJ5TPBXvz+J+RSImUHJunj5Sr4bRfMJ8gCNGuPNrPJd Cl8CcUGrvlp0h0eSobn5ex2tW6/Ch+TK/QLCfurIfMwJMYdDqyffzNSuHDXHVaV7 vcA2fbw8/S7NrVGnEbUXJ94HOT8R1L8PC0k0QLBXg== X-ME-Proxy: X-ME-Sender: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 1BE6C10262; Tue, 3 Jul 2018 12:35:21 -0400 (EDT) Date: Tue, 3 Jul 2018 09:35:19 -0700 From: Andres Freund To: Robert Haas Cc: Etsuro Fujita , Ashutosh Bapat , Rajkumar Raghuwanshi , pgsql-hackers Subject: Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled. Message-ID: <20180703163519.tsigyic5xefunv74@alap3.anarazel.de> References: <5AFC0865.8050802@lab.ntt.co.jp> <5AFD6580.5090308@lab.ntt.co.jp> <5AFE81CC.8000508@lab.ntt.co.jp> <5B17C5EC.1090602@lab.ntt.co.jp> <5B1E5071.1000704@lab.ntt.co.jp> <5B23A964.9020800@lab.ntt.co.jp> <5B28FB19.3090809@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Ashutosh, Etsuro, Robert, On 2018-06-22 10:58:28 -0400, Robert Haas wrote: > On Tue, Jun 19, 2018 at 8:46 AM, Etsuro Fujita > wrote: > > Here is a patch for that. > > > > * As I said upthread, the patch makes code much more simple; I removed all > > the changes to setrefs.c added by the partitionwise-join patch. I also > > simplified the logic for building a tlist for a child-join rel. The original > > PWJ computes attr_needed data even for child rels, and build the tlist for a > > child-join by passing to build_joinrel_tlist that data for input child rels > > for the child-join. But I think that's redundant, and it's more > > straightforward to apply adjust_appendrel_attrs to the parent-join's tlist > > to get the child-join's tlist. So, I changed that way, which made > > unnecessary all the changes to build_joinrel_tlist and placeholder.c added > > by the PWJ patch, so I removed those as well. > > > > * The patch contains all of the regression tests in the original patch > > proposed by Ashutosh. > > I think this approach is going to run into trouble if the level at > which we have to apply the ConvertRowTypeExpr happens not to be a > projection-capable node. What's the plan forward here? This has been an open item for quite a while. Robert, are you in agreement with this approach on a high level? Who is going to drive this forward? Greetings, Andres Freund