Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id E4442B5DBC6 for ; Fri, 8 Jul 2011 23:19:43 -0300 (ADT) 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 04844-07 for ; Sat, 9 Jul 2011 02:19:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id 9B730B5DBC1 for ; Fri, 8 Jul 2011 23:19:37 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id D477B37; Fri, 8 Jul 2011 22:19:37 -0400 (EDT) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WLbRYYJ-2A4b; Fri, 8 Jul 2011 22:19:37 -0400 (EDT) Received: from mail.postnewspapers.com.au (ppp171-128.static.internode.on.net [150.101.171.128]) by www.postnewspapers.com.au (Postfix) with ESMTP id 0A66827; Fri, 8 Jul 2011 22:19:37 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id F14AAAF559; Sat, 9 Jul 2011 10:19:35 +0800 (WST) X-Amavis-Modified: Mail body modified (using disclaimer) - mail.postnewspapers.com.au X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Tgay-yKz-DKW; Sat, 9 Jul 2011 10:19:31 +0800 (WST) Received: from [10.1.1.7] (124-169-57-156.dyn.iinet.net.au [124.169.57.156]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 3ECCCAF558; Sat, 9 Jul 2011 10:19:31 +0800 (WST) Message-ID: <4E17BAB1.2020806@postnewspapers.com.au> Date: Sat, 09 Jul 2011 10:19:29 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Dmitry CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6101: ALTER TABLE hangs with AccessExclusiveLock References: <201107081133.p68BX9f3019848@wwwmaster.postgresql.org> In-Reply-To: <201107081133.p68BX9f3019848@wwwmaster.postgresql.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: 201107/77 X-Sequence-Number: 30689 On 8/07/2011 7:33 PM, Dmitry wrote: > The following bug has been logged online: > > Bug reference: 6101 > Logged by: Dmitry > Email address: y4gr5rzn@gmail.com > PostgreSQL version: 9.0.4 > Operating system: Debian i686 2.6.32-5-686-bigmem > Description: ALTER TABLE hangs with AccessExclusiveLock > Details: > > ALTER locks the table AccessExclusiveLock and hangs. > I can break it with Ctrl-C in psql, but it 100% reproduces in any session. Are there any other sessions running concurrently? Is a lock on the table you are trying to ALTER already held by another transaction according to pg_locks ? So far there's no evidence that this is anything except locking doing its job. -- Craig Ringer POST Newspapers 276 Onslow Rd, Shenton Park Ph: 08 9381 3088 Fax: 08 9388 2258 ABN: 50 008 917 717 http://www.postnewspapers.com.au/