[GENERAL] all serial type was changed to 1

Поиск
Список
Период
Сортировка
От Max Wang
Тема [GENERAL] all serial type was changed to 1
Дата
Msg-id ME1PR01MB13945E28FA2DA6F0D8608F2DA8140@ME1PR01MB1394.ausprd01.prod.outlook.com
обсуждение исходный текст
Ответы Re: [GENERAL] all serial type was changed to 1  (Peter Geoghegan <pg@bowt.ie>)
Re: [GENERAL] all serial type was changed to 1  (Amitabh Kant <amitabhkant@gmail.com>)
Re: [GENERAL] all serial type was changed to 1  (David Rowley <david.rowley@2ndquadrant.com>)
Re: [GENERAL] all serial type was changed to 1  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general

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

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: [GENERAL] Logical replication
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [GENERAL] all serial type was changed to 1