pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Jon Nelson <jnelson+pgsql@jamponi.net>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: Problem with ALTER TABLE - occasional "tuple concurrently updated"
Date: Thu, 18 Nov 2010 15:35:12 -0300
Message-ID: <1290105289-sup-6685@alvh.no-ip.org> (raw)
In-Reply-To: <1290105030-sup-5154@alvh.no-ip.org>
References: <AANLkTin1ojKfoOyD5zSPL++fgMas9PjgPQosDwG5u6ht@mail.gmail.com>
	<AANLkTim23nnhT7CKiLc5Z42N_KyucF9ENVM7bFi6Avaz@mail.gmail.com>
	<AANLkTikrmLMPjcZzMo2T-rknoQpt+e-hf=2uB44SNydd@mail.gmail.com>
	<AANLkTimLfhgsZbUrqk1Rd+uJ9A5LAvUt11wAdUz-9fEQ@mail.gmail.com>
	<1290105030-sup-5154@alvh.no-ip.org>

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@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (13+ messages)  latest in thread

Message-ID: <1290105289-sup-6685@alvh.no-ip.org>
Permalink:  ../1290105289-sup-6685@alvh.no-ip.org/
Also on:    postgresql.org/message-id/1290105289-sup-6685@alvh.no-ip.org

 · 

reply

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: alvherre@commandprompt.com, robertmhaas@gmail.com, jnelson+pgsql@jamponi.net
  Subject: Re: Problem with ALTER TABLE - occasional "tuple concurrently updated"
  In-Reply-To: <1290105289-sup-6685@alvh.no-ip.org>
  References: <AANLkTin1ojKfoOyD5zSPL++fgMas9PjgPQosDwG5u6ht@mail.gmail.com> <AANLkTim23nnhT7CKiLc5Z42N_KyucF9ENVM7bFi6Avaz@mail.gmail.com> <AANLkTikrmLMPjcZzMo2T-rknoQpt+e-hf=2uB44SNydd@mail.gmail.com> <AANLkTimLfhgsZbUrqk1Rd+uJ9A5LAvUt11wAdUz-9fEQ@mail.gmail.com> <1290105030-sup-5154@alvh.no-ip.org> <1290105289-sup-6685@alvh.no-ip.org>

* 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