Re: [GENERAL] all serial type was changed to 1 - Mailing list pgsql-general

From Amitabh Kant
Subject Re: [GENERAL] all serial type was changed to 1
Date
Msg-id CAPTAQBK-uMVrkfH1hLry47RpHSy=_V7A_019C2M0ybdMe=5dJg@mail.gmail.com
Whole thread Raw
In response to [GENERAL] all serial type was changed to 1  (Max Wang <mwang@1080agile.com>)
Responses Re: [GENERAL] all serial type was changed to 1
List pgsql-general


On Mon, May 1, 2017 at 11:21 AM, Max Wang <mwang@1080agile.com> wrote:

Hi All,

 

We have a PostgreSQL database. There are 26 tables and we use serial type as primary key.  We had a insert error as “duplicate key value violates unique constraint, DETAIL:  Key (id)=(1) already exists.” one weeks ago. I checked and found all tables’ id were reset to 1.

 

I checked database log and did not find any useful information.  I am not sure why this happen. The only script which connect to this database is a Python script and only do normal insert/update/delete actions.

 

Please give me some suggestions if you happen to know something about this issue. I appreciate any feedback you might have.

 

I am very new to PostgreSQL and this mail list. Please let me know if I did not something wrong.

 

Thank you.

 

Regards,

Max



By any chance, has it to do anything with the Cycle option of sequences:


pgsql-general by date:

Previous
From: Philippe BEAUDOIN
Date:
Subject: [GENERAL] Column rename in an extension update script
Next
From: David Rowley
Date:
Subject: Re: [GENERAL] all serial type was changed to 1