Re: Inexplicable duplicate rows with unique constraint

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Inexplicable duplicate rows with unique constraint
Дата
Msg-id 20c95566-bdab-49ec-b242-d5c8c9a23065@manitou-mail.org
обсуждение исходный текст
Ответ на Inexplicable duplicate rows with unique constraint  (Richard van der Hoff <richard@matrix.org>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Inexplicable duplicate rows with unique constraint
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Inexplicable duplicate rows with unique constraint