Re: A problem about partitionwise join

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera from 2ndQuadrant <alvherre@alvh.no-ip.org>
To: Richard Guo <riguo@pivotal.io>
Cc: Etsuro Fujita <etsuro.fujita@gmail.com>, Amit Langote <amitlangote09@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-09-10T20:48:22Z
Lists: pgsql-hackers
So in this patch, the input restrictlist is modified to include the
clauses generated by generate_join_implied_equalities_for_all.  That
doesn't seem okay -- doesn't it affect downstream usage of the
restrictlist in the caller of set_joinrel_size_estimates?

I wonder if it's possible to do this by using the ECs directly in
have_partkey_equi_join instead of using them to create fake join
clauses.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. Fix partitionwise join with partially-redundant join clauses