Re: stale temporary tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "thimoty(at)thimoty(dot)it" <thimoty(at)thimoty(dot)it>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: stale temporary tables
Date: 2002-10-04 19:33:06
Message-ID: 26038.1033759986@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> thimoty(at)thimoty(dot)it wrote:
>> i don't know if there is a quicker way, but i ended up in having
>> 40,000 or so
>> stale temp tables from a Java application which is using postgres as
>> backend.

> Lost temp tables should never happen, but they sometimes do because of
> backend crashes.

I was wondering how he got to that state, too. If it was because of
crashes, he must have had an awful lot of crashes.

> I have worked on a patch to auto-delete them, but it
> was rejected and we can't come up with a good way to do it. I think
> this is fixed in 7.3.

7.3 is better anyway: a backend crash can still leave temp tables
behind, but they'll be cleaned up the next time some backend tries
to use the same pg_temp_NNN schema.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-10-04 19:34:54 Re: DTOI4 integer out of range
Previous Message Tom Lane 2002-10-04 19:24:24 Re: DTOI4 integer out of range