Re: Inexplicable duplicate rows with unique constraint - Mailing list pgsql-general

From Daniel Verite
Subject Re: Inexplicable duplicate rows with unique constraint
Date
Msg-id 20c95566-bdab-49ec-b242-d5c8c9a23065@manitou-mail.org
Whole thread Raw
In response to Inexplicable duplicate rows with unique constraint  (Richard van der Hoff <richard@matrix.org>)
List pgsql-general
    Richard van der Hoff wrote:

> So, question: what could we be doing wrong to get ourselves into this
> situation?

OS/libc upgrades without reindexing come to mind.
See https://wiki.postgresql.org/wiki/Collations

>  * At least one user reports that he has recently migrated his database
> from one server to another via a `pg_dump -C` and later piping into psql.

This kind of migration recreates indexes (since it recreates everything)
so it's not subject to the same hazard as an OS/libc upgrade without
reindexing. In fact it would detect the problem if it existed,
as the creation of the unique constraint in the new db would fail if the
data in the dump did not satisfy it.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inexplicable duplicate rows with unique constraint
Next
From: Magnus Hagander
Date:
Subject: Re: Inexplicable duplicate rows with unique constraint