Re: [BUGS] BUG #14874: Dublicate values in primary key

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [BUGS] BUG #14874: Dublicate values in primary key
Дата
Msg-id CAH2-Wz=1TXT55LGfT1XnMvxJYaaoBVk2X8zbHX_oLwQNA5Sk8g@mail.gmail.com
обсуждение исходный текст
Ответ на [BUGS] BUG #14874: Dublicate values in primary key  (sideuxb-ky.consultant@dgfip.finances.gouv.fr)
Список pgsql-bugs
On Thu, Oct 26, 2017 at 8:16 AM,
<sideuxb-ky.consultant@dgfip.finances.gouv.fr> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      14874
> Logged by:          Henri Ky
> Email address:      sideuxb-ky.consultant@dgfip.finances.gouv.fr
> PostgreSQL version: 9.4.4
> Operating system:   CentOS release 6.5
> Description:
>
> We have serious issue with duplicate values in primary key with our database
> running in PostgreSQL 9.4.4.
> This only occured during about 19 hours and in on table. There were no
> restart of the base before and after the issue, and no error found in
> PostgreSQL logs.
>
> We use sequence to generate automatically the ID of the PK for each data
> row.
> Only the ID of the PK are duplicated, whereas the data of their rows are
> different.

That's a very old point release. Many 9.4 bugs were fixed after the
9.4.4 point release, including ones that could account for this. You
ought to be trying to stay on the latest point release.

You'll clearly need to fix the problem by hand, resolving which rows
to keep. Rows can be deleted by using the hidden ctid column.

I also recommend using this tool to isolate the corruption as you fix it:

https://github.com/petergeoghegan/amcheck

There are CentOS packages available from the PGDG yum repository.

-- 
Peter Geoghegan


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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: sideuxb-ky.consultant@dgfip.finances.gouv.fr
Дата:
Сообщение: [BUGS] BUG #14874: Dublicate values in primary key
Следующее
От: bouellette@mixpo.com
Дата:
Сообщение: [BUGS] BUG #14875: pg_createcluster fails to load --createclusterconf