public inbox for [email protected]
help / color / mirror / Atom feedFrom: Álvaro Herrera <[email protected]>
To: [email protected]
To: [email protected]
Subject: Re: BUG #19414: Wrong rows returned by index scan on HASH-partitioned table with PRIMARY KEY (PostgreSQL 16.9)
Date: Mon, 23 Feb 2026 21:23:25 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 2026-Feb-19, PG Bug reporting form wrote:
> CREATE TABLE r_has_stock (
> site_public_id varchar(10) NOT NULL,
[...]
> ) PARTITION BY HASH (site_public_id);
[...]
> Additional notes
> • Database collation: en_US.UTF-8
> • Server encoding: UTF8
> • Explicit casts and COLLATE tests did not change behaviour.
> • Issue appears only when index scan is used.
> • Table and indexes originate from a cluster initially running
> PostgreSQL 14.12 and later upgraded to 16.9.
> • After reindex the issue was resolved.
>
>
> Question
>
> Could this be related to HASH partitioning combined with PRIMARY KEY /
> UNIQUE indexes, or to data created in older PostgreSQL versions and later
> upgraded?
I would be pretty certain that the problem is related to collation
changes, since the partition key is varchar and you said the problem
disappeared after the reindex.
The solution is exactly that: reindex any indexes potentially affected
by collation changes as part of a platform upgrade.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"No hay hombre que no aspire a la plenitud, es decir,
la suma de experiencias de que un hombre es capaz"
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