From: Massimo Ortensi <mortensi@unimaticaspa.it>
To: Erik Wienhold <ewie@ewie.name>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Problems with unique constraints
Date: Thu, 26 Jan 2023 12:52:17 +0100
Message-ID: <1pL0ni-00CnZb-3m@unimaticaspa.it> (raw)
In-Reply-To: <1968679708.705665.1674730579540@office.mailbox.org>
References: <CAK+uD7heWzrAjdRcSYq-z=crnb5mEs8JgsfGYtrK+vb0yrjeKg@mail.gmail.com>
<b977effa32ce6e3088469871e294bea5d4d513b1.camel@cybertec.at>
<1pKzDp-00CgfG-JH@unimaticaspa.it>
<1968679708.705665.1674730579540@office.mailbox.org>
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@unimaticaspa.it <javascript:message_new('mailto',
{mailto:'mortensi@unimaticaspa.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@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
Attachments:
[image/jpeg] UnimaticaRGI.jpg (1.6K, ../1pL0ni-00CnZb-3m@unimaticaspa.it/3-UnimaticaRGI.jpg)
download | view image
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: mortensi@unimaticaspa.it, ewie@ewie.name, pgsql-admin@lists.postgresql.org
Subject: Re: Problems with unique constraints
In-Reply-To: <1pL0ni-00CnZb-3m@unimaticaspa.it>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox