Re: BUG #13935: Duplicate row in pg_constraint table which is not accessible via indexes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #13935: Duplicate row in pg_constraint table which is not accessible via indexes
Дата
Msg-id 30153.1455127298@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #13935: Duplicate row in pg_constraint table which is not accessible via indexes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re[2]: [BUGS] BUG #13935: Duplicate row in pg_constraint table which is not accessible via indexes
Список pgsql-bugs
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> I wonder if you got into this state by adding primary keys concurrently
> somehow.  That should of course not be allowed, but of course there is
> no UNIQUE constraint on conrelid itself, so the normal unique-ification
> code in btree does not fire for this situation.

I thought maybe Simon's changes to reduce lock levels in ALTER TABLE
had gone too far, but simple experiment shows that ALTER ADD PRIMARY KEY
commands still block each other (and then the second one fails as
expected).  So there isn't an obvious hole here.

Given that the OIDs are different, it seems more likely that this is the
result of a primary key being dropped and then re-created, and later
somehow the commit state of the original row got reverted.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13941: Different value "pg_constraint.consrc" for similar Check Constrait
Следующее
От: Andres Freund
Дата:
Сообщение: Re: BUG #13935: Duplicate row in pg_constraint table which is not accessible via indexes