Re: Varying results when using merge joins over postgres_fdw vs hash joins

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, PostgreSQL <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Varying results when using merge joins over postgres_fdw vs hash joins
Date: 2017-09-20 22:37:58
Message-ID: 5599.1505947078@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> On 9/20/17 12:06, Tom Lane wrote:
>> I'm tempted to propose that we invent some kind of "unknown"
>> collation, which the planner would have to be taught to not equate to any
>> other column collation (not even other instances of "unknown"), and that
>> postgres_fdw's IMPORT ought to label remote columns with that collation
>> unless specifically told to do otherwise. Then it's on the user's head
>> if he tells us to do the wrong thing; but we won't produce incorrect
>> plans by default.

> OID 0 might already work that way, depending on the details.

No, OID 0 means "column is not collatable". I'm pretty sure there are
some asserts that will trip if we use that collation OID for a column of a
collatable data type --- and even if there are not, I think conflating the
two cases would be a bad idea.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2017-09-20 22:46:30 Re: PoC: full merge join on comparison clause
Previous Message Tom Lane 2017-09-20 22:34:47 Re: compress method for spgist - 2