Re: [GENERAL] What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?

2010-03-06 Thread Tom Lane
Scott Ribe writes: >> OK, what probably happened was that the data was loaded okay and then >> you got these errors from the commands that attempted to create unique >> indexes. > Isn't it also possible that she was not restoring into an empty database? Maybe, but then she should have seen compl

Re: [GENERAL] What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?

2010-03-06 Thread Scott Ribe
> OK, what probably happened was that the data was loaded okay and then > you got these errors from the commands that attempted to create unique > indexes. Isn't it also possible that she was not restoring into an empty database? -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.co

Re: [GENERAL] What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?

2010-03-06 Thread Tom Lane
"Wang, Mary Y" writes: > Actually I got that type of error during the restore process( I used pg_dump > --insert option when doing the dump). But the interesting thing is that even > though it flagged as an error, those rows of inserts still made to the table > with the correct bug_id. So I'm

Re: [GENERAL] What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?

2010-03-06 Thread Dimitri Fontaine
"Wang, Mary Y" writes: > Because the current value is 6818, during the restore process, it > complained about "duplicate key value violates unique constraint > "bug_pkey, because the value of bug_pk_seq for a insert has been > already been used. So what is the best way to resolve this? Should I

Re: [GENERAL] What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?

2010-03-06 Thread Wang, Mary Y
est way to deal with the pk_seq sequence value after a restore (bulk loading)? "Wang, Mary Y" writes: > After a restore, I got a lot errors like this one : "duplicate key > value violates unique constraint "bug_pkey"". After looking at the dump > file, it h

Re: [GENERAL] What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?

2010-03-06 Thread Tom Lane
"Wang, Mary Y" writes: > After a restore, I got a lot errors like this one : "duplicate key value > violates unique constraint "bug_pkey"". After looking at the dump file, it > has > ... > Because the current value is 6818, during the restore process, it > complained about "duplicate key value

[GENERAL] What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?

2010-03-05 Thread Wang, Mary Y
Hi All, After a restore, I got a lot errors like this one : "duplicate key value violates unique constraint "bug_pkey"". After looking at the dump file, it has CREATE SEQUENCE bug_pk_seq INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE SELECT pg_catalog.setva