Re: Problems with unique constraints

Поиск
Список
Период
Сортировка
От Massimo Ortensi
Тема Re: Problems with unique constraints
Дата
Msg-id 1pL0ni-00CnZb-3m@unimaticaspa.it
обсуждение исходный текст
Ответ на Re: Problems with unique constraints  (Erik Wienhold <ewie@ewie.name>)
Ответы Re: Problems with unique constraints  (Erik Wienhold <ewie@ewie.name>)
Re: Problems with unique constraints  (Holger Jakobs <holger@jakobs.com>)
Список pgsql-admin

we had OS upgrades, but with the same locale.

Is there any chance to avoid rebuilding of all indexes/constraints by checking the correctness of indexes ?

Massimo Ortensi - Responsabile ICT
logo

Via Cristoforo Colombo, 21 - 40131, Bologna 
Tel.  051 4195069
Cell.  3351092560


mortensi@unimaticaspa.it

Questa e-mail e i suoi allegati contengono informazioni di proprietà di Unimatica-RGI S.p.A. e devono essere utilizzati esclusivamente dal destinatario in relazione alle finalità per le quali sono stati ricevuti. E’ vietata qualsiasi forma di riproduzione o di divulgazione senza l’esplicito consenso di Unimatica-RGI S.p.A. Qualora la presente e-mail fosse stata ricevuta per errore, si prega di informare tempestivamente il mittente e distruggere la copia in possesso.

Privacy: I dati personali contenuti in questa e-mail, nonché nei file ivi inclusi, risultano oggetto di tutela ai sensi del Reg. UE 2016/679 (GDPR). Il Titolare del trattamento dei suddetti dati è Unimatica-RGI S.p.A. Gli interessati potranno esercitare tutti i diritti ex artt. 15 e ss. del GDPR inviando un messaggio all’indirizzo privacy@pec.unimaticaspa.it. Qualsiasi trattamento effettuato da chi ha ricevuto per errore tali dati costituisce violazione delle disposizioni previste dal GDPR. In ogni momento è possibile proporre reclamo all’Autorità competente. Per maggiori informazioni si rinvia al sito www.unimaticaspa.it. Ambiente: Considera la responsabilità che hai verso l’ambiente prima di stampare questa e-mail


Il 26/01/2023 11:56, Erik Wienhold ha scritto:
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 по дате отправления:

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