Re: Ignored join clause

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Andreas Karlsson <andreas@proxel.se>, pgsql-bugs@lists.postgresql.org
Date: 2018-04-19T15:20:39Z
Lists: pgsql-bugs
I wrote:
> I've not got to the bottom of it yet either, but I notice that if you
> replace the VALUES thingy with a plain table, the bug goes away:

Oh, scratch that --- if you "ANALYZE q1", it goes right back to the
bogus plan.  So knowing that q1 is small is part of the triggering
condition for picking the bogus plan, but VALUES per se isn't.

			regards, tom lane


Commits

  1. Tweak a couple of planner APIs to save recalculating join relids.

  2. Change more places to be less trusting of RestrictInfo.is_pushed_down.

  3. Fix broken extract_actual_join_clauses call in 9.6 postgres_fdw.

  4. Fix incorrect handling of join clauses pushed into parameterized paths.

  5. Handle restriction clause lists more uniformly in postgres_fdw.