Re: Problems with unique constraints

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: Problems with unique constraints
Дата
Msg-id 1968679708.705665.1674730579540@office.mailbox.org
обсуждение исходный текст
Ответ на Problems with unique constraints  (Massimo Ortensi <mortensi@unimaticaspa.it>)
Ответы Re: Problems with unique constraints  (Massimo Ortensi <mortensi@unimaticaspa.it>)
Список pgsql-admin
> On 26/01/2023 11:11 CET Massimo Ortensi <mortensi@unimaticaspa.it> wrote:
>
> I had troubles with some unique constraints recently.
>
> They simply didn't work, not seeing some records (select found only 47
> records with specific values instead of 65, insert could create
> duplicate records).
>
> The constraint were on multiple columns. Drop constraint and create
> constraint fixed the problem.
>
> This happened on two servers :
>
> - a version 10 server,  where an abnormal poweroff happened 6 months
> ago, found 3 tables with the problem throughout last 6 months.
>
> - a test server, found the problem on 1 table after upgrading version 10
> to 14
>
> Anythng similar happened to anybody ?
> How can I find out if similar problems are present ? constraint and
> index looked ok and were used

Are the indexes on string types?  Changes to the locale data is one cause:
https://www.postgresql.org/message-id/328626.1647362495@sss.pgh.pa.us

--
Erik



В списке pgsql-admin по дате отправления:

Предыдущее
От: Massimo Ortensi
Дата:
Сообщение: Problems with unique constraints
Следующее
От: Massimo Ortensi
Дата:
Сообщение: Re: Problems with unique constraints