pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthew Pounsett <matt@conundrum.com>
Cc: Andreas Kretschmer <andreas@a-kretschmer.de>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: [External] LIMIT not showing all results
Date: Tue, 05 Mar 2019 13:55:18 -0500
Message-ID: <16683.1551812118@sss.pgh.pa.us> (raw)
In-Reply-To: <CAAiTEH9E9+q8YO8WMVMtqP5MwxFaJ+spUhYCVSBXcS4E-XacPQ@mail.gmail.com>
References: <85CFAA9E-E10B-4B1E-8C79-7793CC92BA82@deccio.net>
	<CAE7uO5jf+EytMXTv2Qg=Bg=NfLkbaJqO6PRtEr28R8sAh695mw@mail.gmail.com>
	<2AA9443B-57B7-4088-8B8F-957703E206F0@deccio.net>
	<2871.1551804378@sss.pgh.pa.us>
	<CAE7uO5hSGUcufkPvbZ5K4mBQbBtM4hXGZjsB1vFvy81-Q8UcRQ@mail.gmail.com>
	<e3f08869-3601-f009-94f7-bfd97b0f4164@a-kretschmer.de>
	<22014.1551808473@sss.pgh.pa.us>
	<CAAiTEH9E9+q8YO8WMVMtqP5MwxFaJ+spUhYCVSBXcS4E-XacPQ@mail.gmail.com>

Matthew Pounsett <matt@conundrum.com> writes:
> On Tue, 5 Mar 2019 at 12:54, Tom Lane <tgl@sss.pgh.pa.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.

			regards, tom lane




view thread (20+ messages)  latest in thread

Message-ID: <16683.1551812118@sss.pgh.pa.us>
Permalink:  ../16683.1551812118@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16683.1551812118@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, matt@conundrum.com, andreas@a-kretschmer.de
  Subject: Re: [External] LIMIT not showing all results
  In-Reply-To: <16683.1551812118@sss.pgh.pa.us>
  References: <85CFAA9E-E10B-4B1E-8C79-7793CC92BA82@deccio.net> <CAE7uO5jf+EytMXTv2Qg=Bg=NfLkbaJqO6PRtEr28R8sAh695mw@mail.gmail.com> <2AA9443B-57B7-4088-8B8F-957703E206F0@deccio.net> <2871.1551804378@sss.pgh.pa.us> <CAE7uO5hSGUcufkPvbZ5K4mBQbBtM4hXGZjsB1vFvy81-Q8UcRQ@mail.gmail.com> <e3f08869-3601-f009-94f7-bfd97b0f4164@a-kretschmer.de> <22014.1551808473@sss.pgh.pa.us> <CAAiTEH9E9+q8YO8WMVMtqP5MwxFaJ+spUhYCVSBXcS4E-XacPQ@mail.gmail.com> <16683.1551812118@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox