Re: Wrong results with postgres_fdw and merge anti join from RHEL 7.9 to RHEL 8.7

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Wrong results with postgres_fdw and merge anti join from RHEL 7.9 to RHEL 8.7
Date: 2023-04-05 19:04:56
Message-ID: 2020213.1680721496@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com> writes:
> Both instances use the same collation;

Yeah, doesn't look like you've made any configuration mistakes.
So either the two OSes sort differently, or there's index corruption
causing the indexscan to give bogus output.

The sample data you showed seemed to only involve numeric-ish strings,
which would be highly unlikely to change sort order across locale
updates. But maybe there are weirder entries elsewhere in the column?

Anyway, the first thing I'd try is reindexing both tables --- doesn't
look like they're large enough to make that painful. If that doesn't
fix it you must have a collation difference. (Asking both systems
for a sorted dump of their cprd columns could help confirm that.)
You could probably hack around that, if an OS update isn't feasible,
by labelling the foreign table's column with some collation you aren't
using anywhere else in the local database.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Westermann (DWE) 2023-04-05 19:20:21 Re: Wrong results with postgres_fdw and merge anti join from RHEL 7.9 to RHEL 8.7
Previous Message Daniel Westermann (DWE) 2023-04-05 18:51:51 Re: Wrong results with postgres_fdw and merge anti join from RHEL 7.9 to RHEL 8.7