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

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?
Дата
Msg-id m26359fap3.fsf@hi-media.com
обсуждение исходный текст
Ответ на 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>)
Список 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 по дате отправления:

Предыдущее
От: "Wang, Mary Y"
Дата:
Сообщение: Re: What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?