From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Dawid Kuroczko <qnex42(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Micha? Zaborowski <michal(dot)zaborowski(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Lazy constraints / defaults |
Date: | 2008-03-10 07:52:37 |
Message-ID: | 20080310075237.GB12727@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2008-03-10 10:36:03 | Re: Maximum statistics target |
Previous Message | David Fetter | 2008-03-10 07:16:52 | == Postgres Weekly News - March 09 2008 == |