Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E79B21337B5A for ; Wed, 17 Nov 2010 22:57:16 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 97282-06 for ; Thu, 18 Nov 2010 02:57:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.214.174]) by mail.postgresql.org (Postfix) with ESMTP id 8F26B1337B58 for ; Wed, 17 Nov 2010 22:57:09 -0400 (AST) Received: by iwn35 with SMTP id 35so2904971iwn.19 for ; Wed, 17 Nov 2010 18:57:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+izB2z+j0dNA1Fn9rzrtcRkkunkHOvVfYcBUIhwOlvs=; b=LMKUBZ/isQmX0sDOs1KkArWKLBIlfnaBLQNGcZasIlrzYJm1UQGjDR01GP+5TY9LuN P7avOv5mi+0Bsd5P3At8XtkciYZasD4Ju0FQBtJOC29zZhG6EkwZRFlbD0NsB4lG937w eqluav7tfWfLDJpbkNACsPD5D/RdJksaFNh9A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=e8kWzBw6Mh9Sdj9A3Amq5r11PWpaRrcqmEAXWVHqHR26qkq9GsTV6VV1tsPeTmGZjv PqYmHW7wgwiQPmZ7DU1QYJVNXOXb/uY3ojeXU4kwZ5234dgxsLWOKt/epdztVWpXiWMk a3slfuFpqJO86lEeyF+PQkJ6oYbhCKbCRp7j4= MIME-Version: 1.0 Received: by 10.231.36.204 with SMTP id u12mr9947ibd.149.1290049029671; Wed, 17 Nov 2010 18:57:09 -0800 (PST) Received: by 10.231.10.135 with HTTP; Wed, 17 Nov 2010 18:57:09 -0800 (PST) In-Reply-To: References: Date: Wed, 17 Nov 2010 21:57:09 -0500 Message-ID: Subject: Re: Problem with ALTER TABLE - occasional "tuple concurrently updated" From: Robert Haas To: Jon Nelson Cc: pgsql-bugs@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201011/124 X-Sequence-Number: 28704 On Tue, Nov 16, 2010 at 10:48 AM, Jon Nelson wr= ote: > I have a process which runs in parallel creating tables which, as the > /final/ step in the import, gets SQL much like the following applied: > > ALTER TABLE foo INHERIT bar; > > Periodically, I get this error: =A0tuple concurrently updated > > Of course, I googled for the error message and see a bunch of issues > involving ANALYZE and even DROP function. > Is this the same root cause? Is there a fix? Is there a lock I could > take or some other approach that would prevent the error? > I thought all ALTER TABLE statements took a big fat lock to prevent > such an issue. The ALTER TABLE generates that error? Is it running concurrently with any other DML? What version of PostgreSQL is this? That does sound like a bug. --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company