backup database:
pg_dump > test_db.bak
when restoring database,it encounter an error.
does anyone know what's happen?
[postgres@abc postgres]$ psql test < test_db.bak
You are now connected as new user postgres.
SET
NOTICE: CREATE TABLE will create implicit sequence 'test1_a_seq' for SERIAL col
umn 'test1.a'
ERROR: Relation 'test1_a_seq' already exists
ERROR: copy: line 1, Cannot insert a duplicate key into unique index test1_pkey
lost synchronization with server, resetting connection
ERROR: ALTER TABLE / PRIMARY KEY multiple primary keys for table 'test1' are no
t allowed
setval
5
(1 row)