public inbox for [email protected]
help / color / mirror / Atom feedFrom: Álvaro Herrera <[email protected]>
To: José Antonio Morcillo Valenciano <[email protected]>
Cc: [email protected]
Subject: Re: BUG #19414: Wrong rows returned by index scan on HASH-partitioned table with PRIMARY KEY (PostgreSQL 16.9)
Date: Tue, 24 Feb 2026 13:18:00 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+nR40nyF++Y9v6u6qrSGMmhH9FxzoN_d4NAMXQDtn5KCaqaWA@mail.gmail.com>
On 2026-Feb-24, José Antonio Morcillo Valenciano wrote:
> Hi!
>
> After upgrading we reindex all our databases, so I don't see it clear.
Oh, sorry, you're right, the problem is potentially not with indexes,
but instead it's with the partition key. This would mean that some rows
which previously belonged in one partition, should after the upgrade be
moved to some other partition due to changes in collation rules.
I suspect it's not easy to find such items without fully scanning each
partition. Failing that, you would have to recheck the partition
constraint for each row in each partition, and move rows across
partitions if the partition constraint fails to hold. I don't have a
clear idea how to automate this.
> The difficulty here is finding a test case to work with.
Yes, that is ONE difficulty, but I don't think it's the only one, or
even the most difficult one.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
¡Ay, ay, ay! Con lo mucho que yo lo quería (bis)
se fue de mi vera ... se fue para siempre, pa toíta ... pa toíta la vida
¡Ay Camarón! ¡Ay Camarón! (Paco de Lucía)
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: BUG #19414: Wrong rows returned by index scan on HASH-partitioned table with PRIMARY KEY (PostgreSQL 16.9)
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox