stale temporary tables

Поиск
Список
Период
Сортировка
От thimoty@thimoty.it
Тема stale temporary tables
Дата
Msg-id H397GA$INlhIWp9UQ9UeaMkXo3cWS0aMU1guAqEMo9JsrHd0xFB0@webmessenger.it
обсуждение исходный текст
Ответы Re: stale temporary tables
Список 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 по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: [SQL] arrays
Следующее
От: Darren Ferguson
Дата:
Сообщение: Re: PL/pgSQL