Re: [GENERAL] Postgres crashed when adding a sequence column

2005-01-23 Thread Tom Lane
Richard Huxton writes: > Hmm - wonder if there might be some memory leak in updates to the R-tree Yup, found one. The attached patch is against 7.4. regards, tom lane Index: rtree.c === RCS file: /cvsroot/

Re: [GENERAL] Postgres crashed when adding a sequence column

2005-01-19 Thread Clive Page
This is just to report success: I dropped all indices and repeated: UPDATE intwfs SET id = nextval('myseq'); and it worked fine - took 3681 secs (my estimate of an hour wasn't far out). Now doing a VACUUM FULL to remove the old tuples. -- Clive Page Dept of Physics & Astronomy, University o

Re: [GENERAL] Postgres crashed when adding a sequence column

2005-01-19 Thread Clive Page
On Wed, 19 Jan 2005, Richard Huxton wrote: > Hmm - wonder if there might be some memory leak in updates to the R-tree > - it gets used less than B-tree, so it could be. If you reply to this, > make sure you mention your version of PG - one of the developers might > know more. Probably also worth l

Re: [GENERAL] Postgres crashed when adding a sequence column

2005-01-19 Thread Richard Huxton
Clive Page wrote: On Wed, 19 Jan 2005, Richard Huxton wrote: Nothing wrong with what you're doing, however, you are running a transaction that touches 142 million rows (expiring the old rows and adding new ones). Still, unless you are particularly short of memory, or haven't tuned PostgreSQL it sh

Re: [GENERAL] Postgres crashed when adding a sequence column

2005-01-19 Thread Martijn van Oosterhout
On Wed, Jan 19, 2005 at 09:35:15AM +, 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 wou

Re: [GENERAL] Postgres crashed when adding a sequence column

2005-01-19 Thread Clive Page
On Wed, 19 Jan 2005, Richard Huxton wrote: > Nothing wrong with what you're doing, however, you are running a > transaction that touches 142 million rows (expiring the old rows and > adding new ones). Still, unless you are particularly short of memory, or > haven't tuned PostgreSQL it should be fi

Re: [GENERAL] Postgres crashed when adding a sequence column

2005-01-19 Thread Richard Huxton
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

[GENERAL] Postgres crashed when adding a sequence column

2005-01-19 Thread Clive Page
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