Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails

From: Jeremy Schneider <schnjere(at)amazon(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Cc: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com>
Subject: Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails
Date: 2021-10-01 19:37:31
Message-ID: f7eb4902-8d09-d713-1b55-d2a00ca34a93@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 9/25/21 06:59, Tom Lane wrote:
> Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> writes:
>> On Sat, Sep 25, 2021 at 4:11 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Longer-term, it seems like we really have to be able to represent
>>> the notion of a remote column that has an "unknown" collation (that
>>> is, one that doesn't match any local collation, or at least is not
>>> known to do so).
>
>> +1
>
>> In addition, a) we should detect whether local “default” matches
>> remote “default”,
>
> If we had a way to do that, most of the problem here wouldn't exist.
> I don't believe we can do it reliably. (Maybe we could put it on
> the user to tell us, say via a foreign-server property?)

A related situation is local and remote servers having different
versions of glibc - in particular, pre versus post 2.28. I think there's
still a major brewing storm here that hasn't yet fully hit the world of
PG users.

I know PG throws the warning message for queries using the wrong
collation library version, but I can't remember - does the query still
execute? If so, then glibc 2.28 seems to significnatly raise the
likelihood of wrong query results across the entire global PG install base.

Does PostgreSQL handle cases which involve FDWs (ala this thread) or hot
standbys? Would be nice if some approach could be found to solve that
problem at the same time as the one discussed on this thread.

-Jeremy

--
Jeremy Schneider
Database Engineer
Amazon Web Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-10-01 19:46:39 Re: libpq leaks memory for SSL connections
Previous Message Edouard HIBON 2021-10-01 19:36:22 Re: BUG #17206: the function array_cat(anyarray, anyarray) does not exist

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeremy Schneider 2021-10-01 19:49:34 Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns
Previous Message Mark Dilger 2021-10-01 19:34:53 Re: minor gripe about lax reloptions parsing for views