| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | José Antonio Morcillo Valenciano <jose(dot)morcillo(dot)valenciano(at)gmail(dot)com> |
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19414: Wrong rows returned by index scan on HASH-partitioned table with PRIMARY KEY (PostgreSQL 16.9) |
| Date: | 2026-02-24 12:18:00 |
| Message-ID: | 202602241212.66mpejc6pwpq@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
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)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2026-02-24 17:34:16 | Re: basic_archive lost archive_directory |
| Previous Message | José Antonio Morcillo Valenciano | 2026-02-24 09:26:45 | Re: BUG #19414: Wrong rows returned by index scan on HASH-partitioned table with PRIMARY KEY (PostgreSQL 16.9) |