Re: Lazy constraints / defaults - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Lazy constraints / defaults
Date
Msg-id 20080310075237.GB12727@svana.org
Whole thread Raw
In response to Re: Lazy constraints / defaults  ("Dawid Kuroczko" <qnex42@gmail.com>)
Responses Re: Lazy constraints / defaults
List pgsql-hackers
On Sun, Mar 09, 2008 at 10:45:59PM +0100, Dawid Kuroczko wrote:
> >  alter table tab add column col integer not null default 42 check (col > 0);
>
> I think this will not solve the OP's problem.  He wants to minimize the time
> a table is under exclusive lock, and this ALTER command will effectively
> rewrite the whole table (to add new not null column).

ISTM a while back someone adding a patch that made the above almost
instantaneous. Probably remembering wrong though.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

pgsql-hackers by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Need -fwrapv or -fno-strict-overflow for gcc-4.3
Next
From: Peter Eisentraut
Date:
Subject: Re: Maximum statistics target