Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tFlvC-00Foyn-9X for pgsql-general@arkaria.postgresql.org; Tue, 26 Nov 2024 03:07:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tFlvA-003FEC-OO for pgsql-general@arkaria.postgresql.org; Tue, 26 Nov 2024 03:07:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tFlvA-003FE3-Cs for pgsql-general@lists.postgresql.org; Tue, 26 Nov 2024 03:07:24 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tFlv7-003nPy-PM for pgsql-general@postgresql.org; Tue, 26 Nov 2024 03:07:23 +0000 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-aa55171d73cso282974266b.0 for ; Mon, 25 Nov 2024 19:07:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732590440; x=1733195240; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NB3lci/CLOSgQ1dKyZo+L4Z3F2UI0cMp7OOEYvessVI=; b=WaQxDyLC44pC/cdUnSNpnmMEHZagpBwwl0O0a3Ivo+F6IFM3gRunvnvTLAw3mTHUmL CpC3QWuajbtAN8FvVu78SsFta48Oz5VqncEJiU1vRuBkRGn7zBF69cSt+iY7740J2JHy v6iSPP4ToHqPxyjwDymwrMU80yCYVuHSW7LJeW+DOQP6jafV0Jhwx4/s6M9zxL2deox9 GY7178fhPqmNX+wMsk0FRWmkB5SVvHcRCzcZLxwLbOlHZbOlhyvfyt9nHQt5r+Hph0/C xxVWAQbGjU5ldC0SrsEItTCc7yvG0fUXz3D0JB6FKtvByUcQjD/A0G+o5uOqQpGp/4Bx aLNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732590440; x=1733195240; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NB3lci/CLOSgQ1dKyZo+L4Z3F2UI0cMp7OOEYvessVI=; b=oFmp1Hx+b2qSVTUJC1h6C9bO2ReaXvNhS5Scmm1rT1rU5EHqMataSqzCnrpzTflhFf XmjzzmRkETN1UNFK0IgtlwUlfiow2D1hvTmytpfai7kFIRIEtZEHkSKG9fKb6kl0gDQ6 MRYE/MpbZG73TYgJGDO0QgVoWd7bn/t2mhGkG++sly7ivUkiz3+M/P9+x8S4FVC09ntG iL7BrJtqeVE/kzPS8n1OfI/9+kLwLfL8c/0/hbJQny3zjUwdbpF9XmLEfSIBJIqepCbc /YjlWsFKH54ZABX0xXdIOIvdIcfMnp/l5n6GsQfSPsRGbQ67he04VE1IKzoN/bVcd4tm Kclw== X-Forwarded-Encrypted: i=1; AJvYcCXoMA/Boz7Xp8SHH1uHRXm947IlCQdfoNIQyrnQwu9lItJSpmw4S+InXuF3X27oUbA2jfavHIUOcgibrrE2@postgresql.org X-Gm-Message-State: AOJu0YzBbodwj3vcxoltJdEO3jVXDsN7irS8LvSmt3Sbn3arLz2dQYnU zIco8A8Mw1xsI/fxYAxUDDLZhqUjh+Tn4eeAL6qSntMoJHLMsGWVxDE1mWlAXASE39QyTIdH5eN EObiErW470UQvFFpdUdlfPWV/8S0= X-Gm-Gg: ASbGncttwLChOfSZqft1ITv8YkOiQjSYHtPnS7NCkZyL3+UbPf/t2pJbKTNhp3JUcVV N8mLgEuBUGkVMUyNJBJgcfWusijU6GmS3 X-Google-Smtp-Source: AGHT+IEzUN4Vw91Lja/avtfOjh4wMgMdAGm1XS0VkG29plNAb6jCqPxQxKPolBIf2aMtMMOdn8DhnHNWK87oBJHsDoc= X-Received: by 2002:a17:906:1daa:b0:aa5:24df:ca8 with SMTP id a640c23a62f3a-aa5648a8ca8mr172630266b.18.1732590440125; Mon, 25 Nov 2024 19:07:20 -0800 (PST) MIME-Version: 1.0 References: <42ed36a1-2581-43f7-a606-2c139929b38f@aklaver.com> In-Reply-To: <42ed36a1-2581-43f7-a606-2c139929b38f@aklaver.com> From: shashidhar Reddy Date: Tue, 26 Nov 2024 08:37:08 +0530 Message-ID: Subject: Re: Unique key constraint Issue To: Adrian Klaver Cc: ajit wangkhem , pgsql-general Content-Type: multipart/alternative; boundary="000000000000b99dda0627c82579" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b99dda0627c82579 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Adrian, Thank you for your response. I don't think index corrupted as I can generate the ddl script from the index and the index is still in use when we query. To rebuild the index we are still removing duplicate entries. But nothing found in logs. On Mon, 25 Nov, 2024, 9:30=E2=80=AFpm Adrian Klaver, wrote: > On 11/25/24 00:44, shashidhar Reddy wrote: > > Hi Ajit, > > > > Thank you for your reply! > > > > The result of the query is same across all servers and yes streaming > > replication does not have any issue but the question is how did > > duplicate values entered when there unique key in place. > > Corrupted index? > > Have you tried doing a REINDEX? > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > > --000000000000b99dda0627c82579 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Adrian,

T= hank you for your response.

I don't think index corrupted as I can generate the ddl script from= the index and the index is still in use when we query.=C2=A0
=C2=A0To rebuild the index we are still removing duplicate entrie= s. But nothing found in logs.

On Mon, 25 Nov, 2024, 9:30=E2=80=AFpm Ad= rian Klaver, <adrian.klaver= @aklaver.com> wrote:
On 11/2= 5/24 00:44, shashidhar Reddy wrote:
> Hi Ajit,
>
> Thank you=C2=A0for your reply!
>
> The result of the query is same across all servers and yes streaming <= br> > replication does not have any issue but the question is how did
> duplicate values entered when there unique key in place.

Corrupted index?

Have you tried doing a REINDEX?


--
Adrian Klaver
adrian.klaver@aklaver.com

--000000000000b99dda0627c82579--