Re: Issue with retrieving data when the column has @- in it's value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
Cc: Teju Jakkidi <teja(dot)jakkidi05(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Issue with retrieving data when the column has @- in it's value
Date: 2025-04-05 15:52:26
Message-ID: 2476401.1743868346@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Scott Ribe <scott_ribe(at)elevated-dev(dot)com> writes:
> On Apr 5, 2025, at 9:18 AM, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>> Also, compare the collations shown in the \l output for the database.

> And glibc versions...

Yeah, that. This smells very much like a collation-inconsistency
problem: random punctuation is exactly the sort of input that the
glibc authors tend to change collation behaviors for. I'm betting
that at some point the problematic database was physically copied
between two platforms with inconsistent collations. (The OP
mentioning use of two different Linux distros bolsters this
theory.) That made the index inconsistent with the new platform's
sorting behavior, and weird key lookup failures is exactly what
you get as a result of that.

Short answer: REINDEX whatever index the problematic query is
using, as well as any others on text columns, because they
likely have similar issues you haven't noticed yet.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ursulino Barboza 2025-04-08 16:52:57 DUMP certificação EDB postgres
Previous Message Scott Ribe 2025-04-05 15:27:43 Re: Issue with retrieving data when the column has @- in it's value