FATAL 1: Memory exhausted in AllocSetAlloc()

From: "Gordon P(dot) Oliver" <gordulat(at)pacbel(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: FATAL 1: Memory exhausted in AllocSetAlloc()
Date: 2002-11-24 06:53:16
Message-ID: pan.2002.11.23.23.03.23.977755.4054@pacbel.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All.
I have a problem that generates the out of memory error above in a
consistent manner. It doesn't seem to be covered in the faq's. Note that
this same code does _not_ fail in 7.2.1-5, but please don't ask me to
upgrade, it is a production server :-)

Version:
postgresql-7.0.3-8 (RedHat)

What I am doing:
BEGIN
LOCK TABLE a IN EXCLUSIVE MODE;
ALTER TABLE a RENAME m TO y;
ALTER TABLE a ADD COLUMN m DATE;
ALTER TABLE a RENAME n TO z;
ALTER TABLE a ADD COLUMN n INT;
UPDATE a SET m = to_date(y, 'MM DD YYYY') WHERE m IS NULL AND y ~
'^[0-9][0-9][^0-9][0-9][0-9][^0-9][0-9][0-9][0-9][0-9]$';
UPDATE a SET m = to_date(y, 'MM DD YY') WHERE m IS NULL AND y ~
'^[0-9][0-9][^0-9][0-9][0-9][^0-9][0-9][0-9]$';
... more follows ...

What happens:
Right there, during the second update, I get the out of memory error.

Other information:
The table has abou 60 columns.
There are 29 rows in the table.

Output of free: (lots of free memory)
total used free shared buffers cached
Mem: 254504 252348 2156 0 46196 95440
-/+ buffers/cache: 110712 143792
Swap: 1044216 5856 1038360

Output of ulimit: (could it be stack size or pipe size, the error doesn't
seem appropriate)

core file size (blocks) 1000000
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) 8192
cpu time (seconds) unlimited
max user processes 8157
virtual memory (kbytes) unlimited

Does anyone have any idea of why this would fail?
Thanks in advance
-gordo

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Christian Imbeault 2002-11-24 08:15:46 Calculated fileds in pg
Previous Message Aleksei Wolff 2002-11-24 00:54:07 GUI for Postgres Management? PostgreSQL vs MySQL.