Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Wang, Mary Y" <mary.y.wang@xxxxxxxxxx> 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
> set the value for bug_pk_seq to be 1 in the beginning of the dump
> file?
>
> Any suggestions?

See the following article:

  http://tapoueh.org/articles/blog/_Resetting_sequences._All_of_them,_please!.html

Regards,
-- 
dim

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux