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