Re: [External] LIMIT not showing all results

From: Casey Deccio <casey(at)deccio(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: [External] LIMIT not showing all results
Date: 2019-03-05 21:53:44
Message-ID: 7FD1893B-DFB0-4DBC-87F7-C56AB031B42D@deccio.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Mar 5, 2019, at 11:55 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Matthew Pounsett <matt(at)conundrum(dot)com> writes:
>> On Tue, 5 Mar 2019 at 12:54, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Given that (a) this was triggered by a server migration and (b)
>>> the leading column of the index looks like it's probably varchar,
>>> I'm suspicious that the new server has different collation behavior.
>
>> The migration in question was an rsync from a Debian 9 box
>> running 9.4.19-0+deb8u1 to a FreeBSD 11 box running 9.4.20.
>
> Yeah, that would fit the theory :-(. Debian would be using glibc
> and FreeBSD would not be. If you were using C collation in the
> database, you'd be all right because that's standardized, but I'll
> bet you were using something else. What does psql \l show for the
> "collate" setting of this database? (Or, if by chance you had an
> explicit COLLATE setting on the column in question, what's that?)
>
> In any case, you should be reindexing any indexes on textual columns
> that were not using "C" collation; none of them can be trusted.
> The system catalogs should be OK.

Many thanks to you and everyone who helped with this issue, with informative and actionable advice. Reindexing worked like a champ, and we seem to be back in business.

Casey

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Pounsett 2019-03-05 23:03:08 Re: [External] LIMIT not showing all results
Previous Message Kenneth Marshall 2019-03-05 21:18:45 Re: Server upgrade advice