From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Clive Page <cgp(at)star(dot)le(dot)ac(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Postgres crashed when adding a sequence column |
Date: | 2005-01-19 11:13:37 |
Message-ID: | 20050119111332.GC18648@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jan 19, 2005 at 09:35:15AM +0000, Clive Page wrote:
> I have a largish table (71 million rows) to which I needed to add a new
> integer column containing a unique identifier - a simple sequence seemed
> to be good enough. I discovered the CREATE SEQUENCE command which looked
> as if it would do the job, and did the following:
>
> ALTER TABLE intwfs ADD COLUMN id int ;
> CREATE SEQUENCE myseq;
> UPDATE intwfs SET id = nextval('myseq');
You're not doing anything unusual there. Do you have any deferred
constrints or foreign keys. I can't think of anything else that might
take memory during the transaction.
The pg_dump output of the schema of that table would clear this up
probably.
Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
From | Date | Subject | |
---|---|---|---|
Next Message | Marco Colombo | 2005-01-19 11:20:23 | Re: Multiline plpython procedure |
Previous Message | Clive Page | 2005-01-19 11:13:22 | Re: Postgres crashed when adding a sequence column |