stale temporary tables - Mailing list pgsql-general

From thimoty@thimoty.it
Subject stale temporary tables
Date
Msg-id H397GA$INlhIWp9UQ9UeaMkXo3cWS0aMU1guAqEMo9JsrHd0xFB0@webmessenger.it
Whole thread Raw
Responses Re: stale temporary tables  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Hello all,
 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.

what i did is the following:
1) run postmaster with -o -O
2) type \dS and put the result to a file (list of all the temp tables,
all still there!)
3) create a sql file to drop the tables like this
cut -f1 -d\| staletables.txt | grep pg_temp | sed '/pg_temp.[0-9]*.[0-9]
*/s//DROP TABLE "&";/' > droptables.sql
4) from pgsql run \i droptables.sql

isn't there any switch or command in VACUUM that does it?

Regards
 Tim


pgsql-general by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: [SQL] arrays
Next
From: Darren Ferguson
Date:
Subject: Re: PL/pgSQL