Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 9574D6331E2 for ; Thu, 22 Apr 2010 19:56:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 89068-06 for ; Thu, 22 Apr 2010 22:56:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from imail.internode.com.au (exchht01-ext.internode.com.au [203.26.95.185]) by mail.postgresql.org (Postfix) with ESMTP id 66A976331DC for ; Thu, 22 Apr 2010 19:56:21 -0300 (ADT) Received: from EXCHMAIL.staff.internode.com.au ([169.254.1.229]) by exchht01.staff.internode.com.au ([fe80::193f:3ff6:d38f:74dc%12]) with mapi; Fri, 23 Apr 2010 08:26:16 +0930 From: Samuel Stearns To: Scott Marlowe CC: "pgsql-admin@postgresql.org" Date: Fri, 23 Apr 2010 08:26:15 +0930 Subject: Re: ALTER TABLE ADD COLUMN Hangs Thread-Topic: [ADMIN] ALTER TABLE ADD COLUMN Hangs Thread-Index: Acrh511DEGXT+gwxSemAT1LZP0oaNQAhxFIg Message-ID: <68B59BEDCD36854AADBDF17E91B2937A01A4DC6401@EXCHMAIL.staff.internode.com.au> References: <68B59BEDCD36854AADBDF17E91B2937A01A4DC6236@EXCHMAIL.staff.internode.com.au> In-Reply-To: Accept-Language: en-US, en-AU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, en-AU Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.559 tagged_above=-10 required=5 tests=AWL=1.351, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/312 X-Sequence-Number: 34406 Thanks Ross and Scott. I got it to complete finally thanks to Ross' tip of= looking at pg_locks. I had to kill a few processes with exclusive locks o= n the table and then presto! Scott, the query didn't have a DEFAULT keyword with it and I've got a reque= st in with our sysadmins to upgrade us to 8.3.10. Thanks both of you for a= ll your help. Sam -----Original Message----- From: Scott Marlowe [mailto:scott.marlowe@gmail.com]=20 Sent: Thursday, 22 April 2010 4:15 PM To: Samuel Stearns Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] ALTER TABLE ADD COLUMN Hangs On Wed, Apr 21, 2010 at 8:17 PM, Samuel Stearns wrote: > Howdy, > > I'm running in an 8.3.3 environment.=A0 What could cause, or how can I > diagnose, why an 'ALTER TABLE ADD COLUMN' statement runs for hours > eventually locking users out and requiring to be killed in the end? And not that it matters here, but is there a reason for running such out of date pgsql code?