Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 326C81337BC9 for ; Thu, 10 Mar 2011 17:08:39 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 24769-10 for ; Thu, 10 Mar 2011 21:08:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id A8AA61337BA6 for ; Thu, 10 Mar 2011 17:08:31 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id p2AL8UG09681; Thu, 10 Mar 2011 16:08:30 -0500 (EST) From: Bruce Momjian Message-Id: <201103102108.p2AL8UG09681@momjian.us> Subject: Re: Problem with ALTER TABLE - occasional "tuple concurrently updated" In-Reply-To: <1290105289-sup-6685@alvh.no-ip.org> To: Alvaro Herrera Date: Thu, 10 Mar 2011 16:08:29 -0500 (EST) CC: Robert Haas , Jon Nelson , pgsql-bugs X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="UNKNOWN-8BIT" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/176 X-Sequence-Number: 29686 Was this fixed? --------------------------------------------------------------------------- Alvaro Herrera wrote: > Excerpts from Alvaro Herrera's message of jue nov 18 15:31:16 -0300 2010: > > Excerpts from Robert Haas's message of jue nov 18 15:11:37 -0300 2010: > > > > > In the current master branch, it appears that "ALTER TABLE c INHERIT > > > p" takes a ShareUpdateExclusiveLock on the child, which seems > > > sufficient, and an AccessShareLock on the parent, which seems like it > > > might not be; though I'm having a hard time figuring out exactly when > > > it wouldn't be, especially since in 8.4 I'm fairly sure any ALTER > > > TABLE command takes an AccessExclusiveLock. > > > > What if two of these run at the same time, and the parent doesn't > > have children when they start? They would both try to set > > relhassubclass, no? > > Yep, duplicated the issue that way. > > -- > Álvaro Herrera > The PostgreSQL Company - Command Prompt, Inc. > PostgreSQL Replication, Consulting, Custom Development, 24x7 support > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +