Re: Problem with ALTER TABLE - occasional "tuple concurrently updated"

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Problem with ALTER TABLE - occasional "tuple concurrently updated"
Date: 2011-03-10 21:08:29
Message-ID: 201103102108.p2AL8UG09681@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


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 <alvherre(at)commandprompt(dot)com>
> The PostgreSQL Company - Command Prompt, Inc.
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2011-03-10 23:50:56 Re: Documentation bug: Chapter 35.4, paragraph 4
Previous Message Dave Page 2011-03-10 05:58:28 Re: BUG #5922: Add-on installation error.