Re: BUG #15952: UNIQUE CONSTRAINT does not fulfill its' purpose - Mailing list pgsql-bugs

From Thomas Munro
Subject Re: BUG #15952: UNIQUE CONSTRAINT does not fulfill its' purpose
Date
Msg-id CA+hUKGLVOj+askdiq7MPVLOPGcVta_jZMthMUKdToRkTXeW0Lw@mail.gmail.com
Whole thread Raw
In response to BUG #15952: UNIQUE CONSTRAINT does not fulfill its' purpose  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #15952: UNIQUE CONSTRAINT does not fulfill its' purpose  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-bugs
On Tue, Aug 13, 2019 at 8:23 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
>     "cimek_irsz_telepules_telepulesresz_kozternev_kozterjelleg_h_key" UNIQUE
> CONSTRAINT, btree (irsz, telepules, telepulesresz, kozternev, kozterjelleg,
> hazszam, hazszambetujel, hazszamvege, lepcsohaz, em, ajto, ajtobetujel)

> I tried to reproduce the issue locally without success. I encountered this
> bug in multiple databases with different table and data. I could upgrade the
> database to version 11 with "pg_upgradecluster 11 main -m upgrade -k", and
> the issue still remain. To make sure it's not a human error, I tried to dump
> the data and restore it. I got duplicate key error as expected.

How old is the duplicate data?  I guess you are using the Hungarian
locale as the default collation for your database (see "Collate" in
the output of \l, or check for explicit collations on the relevant
columns).  I think that is one of the collations that has moved around
a bit in recent years in glibc.  For example:

https://sourceware.org/bugzilla/show_bug.cgi?id=13547

-- 
Thomas Munro
https://enterprisedb.com



pgsql-bugs by date:

Previous
From: Jeff Janes
Date:
Subject: Re: BUG #15950: pg_freespace.avail is 0
Next
From: Daniel Adeniji
Date:
Subject: Re: BUG #15950: pg_freespace.avail is 0