Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>

From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>, Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-08-03T13:28:08Z
Lists: pgsql-hackers
(2018/08/03 22:18), Etsuro Fujita wrote:
> Here is a patch for refusing to generate PWJ paths when WRVs are involved:
>
> * We no longer need to handle WRVs, so I've simplified
> build_joinrel_tlist() and setrefs.c to what they were before
> partition-wise join went in, as in the previous patch.
>
> * attr_needed data for each child is used for building child-joins'
> tlists, but I think we can build those by applying
> adjust_appendrel_attrs to the parent's tlists, without attr_needed. So,
> I've also removed that as in the previous patch.

One thing to add: as for the latter, we don't need the changes to 
placeholder.c either, so I've also simplified that to what they were 
before partition-wise join went in.

Best regards,
Etsuro Fujita


Commits

  1. Adjust EXPLAIN's output for disabled nodes

  2. Disable support for partitionwise joins in problematic cases.

  3. Rewrite the code that applies scan/join targets to paths.