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

From Dimitri Fontaine
Subject Re: What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?
Date
Msg-id m26359fap3.fsf@hi-media.com
Whole thread Raw
In response to What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?  ("Wang, Mary Y" <mary.y.wang@boeing.com>)
List pgsql-general
"Wang, Mary Y" <mary.y.wang@boeing.com> 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

pgsql-general by date:

Previous
From: "Wang, Mary Y"
Date:
Subject: Re: What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?
Next
From: Tom Lane
Date:
Subject: Re: What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?