public inbox for [email protected]  
help / color / mirror / Atom feed
From: ajit wangkhem <[email protected]>
To: shashidhar Reddy <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Unique key constraint Issue
Date: Mon, 25 Nov 2024 13:21:41 +0530
Message-ID: <CAMurXp115NcKB64EsksfSMJmztS_FBm0PuAmnXu_OXgh8MVz3w@mail.gmail.com> (raw)
In-Reply-To: <CAH=zU4t3KRpt6uTZn_4eKkvpL_X9ACGNZ+XDxfMjnn6ovAyPVQ@mail.gmail.com>
References: <CAH=zU4t3KRpt6uTZn_4eKkvpL_X9ACGNZ+XDxfMjnn6ovAyPVQ@mail.gmail.com>

  Output should be consistent across servers below query o/p

SELECT conname, pg_get_constraintdef(oid)
FROM pg_constraint
WHERE conrelid = 'your table name'::regclass AND contype = 'u';
(different datatype combine in UK is not an issue). This issue may not
happen in asynchronous, log shipping or streaming replication. In logical
replication it may create problem.

On Mon, Nov 25, 2024 at 12:01 PM shashidhar Reddy <
[email protected]> wrote:

> Hello,
>
> We have postgresql servers with PostgreSQL 13.10   on Ubuntu release 22.04.
>
> The issue is a unique key constraint with two columns one is character
> another is integer. At some point the unique key did not work as I see
> duplicate values with these two columns combination and it happened on
> multiple servers on multiple databases on same table with same unique key.
> I tried db dump and restore but the key is failing to create when restore
> with duplicate value errors.
>
>
>
>


view thread (3+ messages)  latest in thread

reply

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Unique key constraint Issue
  In-Reply-To: <CAMurXp115NcKB64EsksfSMJmztS_FBm0PuAmnXu_OXgh8MVz3w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox