From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: bear2k@mail.ru
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13935: Duplicate row in pg_constraint table which is not accessible via indexes
Date: Wed, 10 Feb 2016 13:01:38 -0500
Message-ID: <30153.1455127298@sss.pgh.pa.us> (raw)
In-Reply-To: <20160210165222.GA347443@alvherre.pgsql>
References: <20160210165222.GA347443@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, bear2k@mail.ru
Subject: Re: BUG #13935: Duplicate row in pg_constraint table which is not accessible via indexes
In-Reply-To: <30153.1455127298@sss.pgh.pa.us>
References: <20160210165222.GA347443@alvherre.pgsql> <30153.1455127298@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox