Re: stale temporary tables - Mailing list pgsql-general

From Tom Lane
Subject Re: stale temporary tables
Date
Msg-id 26038.1033759986@sss.pgh.pa.us
Whole thread Raw
In response to Re: stale temporary tables  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> thimoty@thimoty.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: DTOI4 integer out of range
Next
From: Bruce Momjian
Date:
Subject: Re: DTOI4 integer out of range