Welcome to psql, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands
\g or terminate with semicolon to execute query \q to quit
stage=# alter table dartists add column darank integer ;
ALTER
stage=# update dartists set darank = 100 ;
UPDATE 56240
stage=# vacuum dartists ;
VACUUM
stage=# alter table zsong add column zsrank integer ;
ALTER
stage=# update zsong set zsrank = 100 ;
FATAL 1: Memory exhausted in AllocSetAlloc()
pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
stage=# \q
There are 2273429 records in the table.
Postgres as started as:
su -l $PGUSER -c "$POSTMASTER -i -S -B 8192 -D$PGDIR -o '-Ffs -S 8192'"
The Machine has 512M RAM.
The block size is 32K.
A dump of zsong schema looks like:
Table "zsong"Attribute | Type | Modifier
-----------+-----------+----------muzenbr | integer |disc | integer |trk | integer |song |
varchar()|artistid | integer |acd | varchar() |trackid | integer |zsrank | integer |
Indices: zsong_artistid_ndx, zsong_lsong_ndx, zsong_muzenbr_ndx, zsong_song_ndx,
zsong_trackid_ndx
I have seen this behavior a couple times, in fact I normally write a
script that does multiple conditional updates, followed by a vacuum. I
just forgot this time. I can work around this, but I thought you might
be interested. It has also seemed to cause some database corruption:
NOTICE: Rel zsong: TID 7389/275: OID IS INVALID. TUPGONE 1.
P.S. This was a staging database, it was created as "pg_dump dbname |
psql stage" just prior to the alters.
--
http://www.mohawksoft.com