Re: Memory Errors... - Mailing list pgsql-general

From Ian Harding
Subject Re: Memory Errors...
Date
Msg-id sd89814e.017@mail.tpchd.org
Whole thread Raw
In response to Memory Errors...  ("Ian Harding" <ianh@tpchd.org>)
Responses Re: Memory Errors...  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
OK, I lied.  I changed something inside the first function.

It calls another function that now uses a temporary table.  It creates, uses and drops the table.  It is usually called
onlyonce per transaction, but it is called repeatedly from the main function in this case.  When I run the function,
thememory numbers reported by  top climb quickly until it blows up.  I wonder if this has anything to do with it. 

I am using connection pooling, so if I don't explicitly drop the temp table, it might be lying around for other users
tosee.  That is probably OK if I check for its existence, then truncate it before using it. 

Any of this make sense?

Ian

>>> "Ian Harding" <ianh@tpchd.org> 09/19/02 07:10AM >>>
Can someone tell me what these mean?  They happen when running big ugly pgtcl functions that delete, insert and update
lotsof stuff in the database. 

ERROR:  Memory exhausted in AllocSetContextCreate(8192)
ERROR:  Memory exhausted in AllocSetAlloc(88)
ERROR:  Memory exhausted in AllocSetAlloc(60)

Seems pretty straightforward, "You ran out of memory, dummy!"  But the functions that are running here used to work
fine. The only thing I changed was recompiling my kernel to change the following line: 

options         SHMMAXPGS=8192  # 1024 pages is the default

which I thing brings my maximum amount of shared memory from about 4 MB to about 32 MB.  (256 MB is installed)  I then
changedthe line in postgresql.conf like this: 

shared_buffers = 3000        # 2*max_connections, min 16

which I think says "PostgreSQL, there is about 24 MB of shared memory available to you."

You would think this would be better, not worse, than the defaults.

The machine has 256 MB of RAM.  It is running both PostgreSQL and AOLServer.  It is NetBSD 1.5.2 and PostgreSQL 7.2.1:

 PostgreSQL 7.2.1 on i386--netbsdelf, compiled by GCC egcs-1.1.2

Since I don't know what I am doing, I tried to be conservative in bumping up the numbers having to do with memory.

Should I be looking at my function, or did I botch the memory configuration so badly that it is breaking stuff?

Thanks!

Ian


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


pgsql-general by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: killing process question
Next
From: Stephan Szabo
Date:
Subject: Re: Adding "on delete cascade" after table creation ?