Re: Problems with unique constraints

From: Massimo Ortensi <mortensi(at)unimaticaspa(dot)it>
To: Erik Wienhold <ewie(at)ewie(dot)name>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Problems with unique constraints
Date: 2023-01-26 11:52:17
Message-ID: 1pL0ni-00CnZb-3m@unimaticaspa.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 <http://www.unimaticaspa.it/>

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

_mortensi(at)unimaticaspa(dot)it <javascript:message_new('mailto',
{mailto:'mortensi(at)unimaticaspa(dot)it', folder:'SU5CT1g=', msgid:'',
subject: '', body:'0'})> _

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(at)pec(dot)unimaticaspa(dot)it(dot) 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(at)unimaticaspa(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Erik Wienhold 2023-01-26 12:39:44 Re: Problems with unique constraints
Previous Message Erik Wienhold 2023-01-26 10:56:19 Re: Problems with unique constraints