Re: "out of shared memory error" with temp tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: A Gattiker <agattik(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "out of shared memory error" with temp tables
Date: 2006-02-13 06:56:22
Message-ID: 19607.1139813782@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

A Gattiker <agattik(at)gmail(dot)com> writes:
> I have procedures that create temporary tables every time. When those
> procedures are called many times in a single transaction I get an "out
> of shared memory error". This happens even if the temporary tables are
> correctly dropped as shown in the example below. Does postgres retain
> a lock to a dropped object? How may I prevent this?

Yes, and you can't, because the object is not actually dropped until end
of transaction. I'd suggest rethinking your temp table use: that design
is going to bloat the system catalogs enormously, even if you weren't
running out of lock space.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-02-13 06:58:22 Re: Compile of Pgmail function fails
Previous Message Peter Eisentraut 2006-02-13 06:49:43 Re: Why does an ON SELECT rule have to be named "_RETURN"?