Problems with unique constraints

From: Massimo Ortensi <mortensi(at)unimaticaspa(dot)it>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Problems with unique constraints
Date: 2023-01-26 10:11:09
Message-ID: 1pKzDp-00CgfG-JH@unimaticaspa.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Erik Wienhold 2023-01-26 10:56:19 Re: Problems with unique constraints
Previous Message Benjamin Leis 2023-01-26 00:18:01 Re: Long running queries