Search Postgresql Archives

Re: temp tables remain after server restart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hari Bhaskaran <hbhaskaran@xxxxxxxxx> writes:
> one of our programs went haywire and created around 200,000 temp
> tables. In the end, I restarted the db, but the temporary tables are
> still around

What did you do, the old "kill -9 some random process" approach to
database management?  The recommended ways of cancelling a session
wouldn't have caused this.

> What should I be doing to clean it up?

There is code to make them go away the first time a backend wants to use
the relevant pg_temp_xxxxx namespace.  So you could start a backend,
do "create temp table ...", start another backend while the first
remains running, do another "create temp table ...", repeat until they
go away.

It would probably work to do "drop schema pg_temp_xxxxx cascade" too,
but you'd have to be really careful not to clobber the temp schema of
an active backend this way.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux