Re: Unique key constraint Issue

2024-11-26 Thread shashidhar Reddy
Thank you Adrian. We replicated the issue with OS upgrade. On Tue, 26 Nov, 2024, 11:06 am Adrian Klaver, wrote: > On 11/25/24 19:07, shashidhar Reddy wrote: > > Hi Adrian, > > > > Thank you for your response. > > > > I don't think index corrupted as I can generate the ddl script from the > > Wh

Re: Unique key constraint Issue

2024-11-26 Thread shashidhar Reddy
Thank you Tom! The issue is with OS upgrade we could able replicate it. On Mon, 25 Nov, 2024, 9:32 pm Tom Lane, wrote: > shashidhar Reddy writes: > > 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 se

Re: Unique key constraint Issue

2024-11-25 Thread Adrian Klaver
On 11/25/24 19:07, shashidhar Reddy wrote: Hi Adrian, Thank you for your response. I don't think index corrupted as I can generate the ddl script from the What DDL script? index and the index is still in use when we query. See Tom Lanes post for more detail. Short version the index will

Re: Unique key constraint Issue

2024-11-25 Thread shashidhar Reddy
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 pm Adrian Klaver

Re: Unique key constraint Issue

2024-11-25 Thread Tom Lane
shashidhar Reddy writes: > 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

Re: Unique key constraint Issue

2024-11-25 Thread Adrian Klaver
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

Re: Unique key constraint Issue

2024-11-25 Thread ajit wangkhem
sure. In oracle extra space omit but in Postgres it would not. Sent from Outlook for iOS<https://aka.ms/o0ukef> From: shashidhar Reddy Sent: Monday, November 25, 2024 2:14:37 PM To: ajit wangkhem Cc: pgsql-general Subject: Re: Unique key constraint Issue H

Re: Unique key constraint Issue

2024-11-25 Thread shashidhar Reddy
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. On Mon, 25 Nov, 2024, 1:21 pm ajit wangkhem, wrote: > Output should

Re: Unique key constraint Issue

2024-11-24 Thread ajit wangkhem
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 s