Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eltvx-00087f-1k for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Feb 2018 10:05:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eltvv-0002b6-FR for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Feb 2018 10:04:59 +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.84_2) (envelope-from ) id 1eltvv-0002aw-8A for pgsql-hackers@lists.postgresql.org; Wed, 14 Feb 2018 10:04:59 +0000 Received: from mail-pg0-x231.google.com ([2607:f8b0:400e:c05::231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eltvr-00070l-AU for pgsql-hackers@postgresql.org; Wed, 14 Feb 2018 10:04:58 +0000 Received: by mail-pg0-x231.google.com with SMTP id j9so1744833pgp.11 for ; Wed, 14 Feb 2018 02:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ovSS9N3whiCZJndGAeXlQiZPV7FibDCHL1Ow33faYl4=; b=rqBvDzJQYLI+C/5W4zJnRehojDViUxmQnjE3iCQi/qgv31ws9un3ijhO99h+ucQJmN w8kh/Smi1LLLRlgyOVbdT6ldnsLCFzq2NDsbYM8ClfhdNFhfRDCT0TaAN0cIEDKqExvs HYfBRX7keAi0Gx6dY8y6L5RYrSzqQSS/EEo+9ltHdhk/8Gkg20ZopLnZ/VD27Om4jOfQ m1+elRtvCo0yLAanTLNecjAJ42aw91RqN5YHCfPdKh3Gjb4Glow9JjSjcwLOXapor6/e 31zgeMKSzPjij4yn605nDGAz9o0WaDtDbKwHL+d36ev8iiTAJYtGd3FCtRDEt7wE6RFz 5zzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ovSS9N3whiCZJndGAeXlQiZPV7FibDCHL1Ow33faYl4=; b=YyswuDjqp2Asc4eIkiC+HEJU3fdOyS9ifTNyDUJk2SkDypoG46g/KATy+UIG9ZUYsS ThP1iZYTqWx7lRKR4LRWIDK4m0dkon3Kyy0sM7WwiOPR2Jy0cwl+oouPnd+0cjOOfvBv TE+N4QlamyNH/ZjqGhagzzfMwQtsmTE8LPrlU+TK1lDW2zEM/TUTlS586d5UNkPJNh82 fsr7jkixdjqctCMGmqBE87sqtP0fxdXUoKI5mGzo6up1CfqSxJHLIiuLsfubygyBOce+ PNcju/ygVsuTGWw2tYex/6Z/GDfrluGe3Z0p0kYEHGsxB1YBzj0vUxmg5PuA6d+gPY9v Emng== X-Gm-Message-State: APf1xPAegn5MnJ2CwqHG7dHta6agxSQnna+o7P5ZohWllHWKmN1fHFjV 84ItNFRnkEJL5j8bhlyELCU6xZggRFQYJRjuChw+xQ== X-Google-Smtp-Source: AH8x22752MnKtUCdx4qF7NcVENjuic0UfGK7EShzqWJ7NugEL2AynO9hqQ6kCS2jI2GMw65BkkDR4I0fjRq4M7MLdbY= X-Received: by 10.99.113.67 with SMTP id b3mr3600741pgn.134.1518602692559; Wed, 14 Feb 2018 02:04:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.137.139 with HTTP; Wed, 14 Feb 2018 02:04:52 -0800 (PST) In-Reply-To: <5A83FF5B.9050800@lab.ntt.co.jp> References: <5A83FF5B.9050800@lab.ntt.co.jp> From: Ashutosh Bapat Date: Wed, 14 Feb 2018 15:34:52 +0530 Message-ID: Subject: Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled. To: Etsuro Fujita Cc: Rajkumar Raghuwanshi , pgsql-hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Feb 14, 2018 at 2:50 PM, Etsuro Fujita wrote: > > I'd vote for #1, but ISTM that that's more like a feature, not a fix. > Pushing down ConvertRowtypeExprs to the remote seems to me to be the same > problem as pushing down PHVs to the remote, which is definitely a feature > development. I think a fix for this would be to just give up pushing down a > child join in foreign_join_ok or somewhere else if the reltarget of the > child-join relation contains any ConvertRowtypeExprs. That means we won't be able to push down any scans under a DML on a partitioned table. That will be too restrictive. I think the case of PHV and ConvertRowtypeExprs are different. The the former we need a subquery to push PHVs, whereas to deparse ConvertRowtypeExpr on the nullable side we can use the same strategy as whole-row expression deparsing. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company