Re: ALTER TABLE <name> ADD COLUMN Hangs

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Samuel Stearns <SStearns(at)internode(dot)com(dot)au>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: ALTER TABLE <name> ADD COLUMN Hangs
Date: 2010-04-22 06:44:27
Message-ID: t2pdcc563d11004212344n57b5ece8z62b3d1b144528095@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Apr 21, 2010 at 8:17 PM, Samuel Stearns
<SStearns(at)internode(dot)com(dot)au> wrote:
> Howdy,
>
> I’m running in an 8.3.3 environment.  What could cause, or how can I
> diagnose, why an ‘ALTER TABLE <name> ADD COLUMN’ statement runs for hours
> eventually locking users out and requiring to be killed in the end?

By any chance you got a default on there? If so the whole table gets
updated to the default, thus rewritten and locked while this happens.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2010-04-22 06:45:07 Re: ALTER TABLE <name> ADD COLUMN Hangs
Previous Message Ross J. Reedstrom 2010-04-22 03:43:17 Re: ALTER TABLE <name> ADD COLUMN Hangs