pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: kdhanjee@gmail.com
Subject: BUG #17173: Primary Key ignored resulting in duplicate values
Date: Wed, 01 Sep 2021 09:21:08 +0000
Message-ID: <17173-d0151264e4a69eb5@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17173
Logged by:          Ketan Dhanjee
Email address:      kdhanjee@gmail.com
PostgreSQL version: 11.9
Operating system:   CentOS Linux 7
Description:        

Dear Sir/Madam,

We have found issues on our database tables with duplicate values for tables
defined with primary keys.

Below please find output from one of our tables with duplicate values on the
primary key:

Table DDL:

CREATE TABLE component.priceupdate
(
    id bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1
MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 ),
    reference character varying(50) COLLATE pg_catalog."default",
    effectivedate timestamp(6) without time zone,
    "timestamp" timestamp(6) without time zone,
    priceupdatestatus character varying(50) COLLATE pg_catalog."default",
    modifieddate timestamp(6) without time zone,
    CONSTRAINT priceupdate_pkey PRIMARY KEY (id)
        USING INDEX TABLESPACE pgwlicsdb
)
WITH (
    OIDS = FALSE
)
TABLESPACE pgwlicsdb;

--------------------------------------------
Select output:

select * from component.priceupdate where id=3001279;

id                 |     reference           |       effectivedate          
        |  timestamp                           |    priceupdatestatus      
| modifieddate
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3001279        1250812673793      2021-03-18  00:00:00               
2021-04-06  13:19:14.997     Failed                            2021-05-23 
12:16:49.503
3001279        1250812673793      2021-03-18  00:00:00               
2021-04-06  13:19:14.997     Failed                            2021-05-23 
12:45:09.206

We have other tables that also have duplicates for primary key.

Could you please provide feedback with regards to my query.

Thanks
Ketan



view thread (2+ messages)  latest in thread

Message-ID: <17173-d0151264e4a69eb5@postgresql.org>
Permalink:  ../17173-d0151264e4a69eb5@postgresql.org/
Also on:    postgresql.org/message-id/17173-d0151264e4a69eb5@postgresql.org

 · 

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: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, kdhanjee@gmail.com
  Subject: Re: BUG #17173: Primary Key ignored resulting in duplicate values
  In-Reply-To: <17173-d0151264e4a69eb5@postgresql.org>

* 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