Re: Removing pgsql_tmp files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Glaesemann <michael(dot)glaesemann(at)myyearbook(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Removing pgsql_tmp files
Date: 2010-11-08 21:03:25
Message-ID: 218.1289250205@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Michael Glaesemann <michael(dot)glaesemann(at)myyearbook(dot)com> writes:
> We've got over 250GB of files in a pgsql_tmp directory, some with modification timestamps going back to August 2010 when the server was last restarted.

That's very peculiar. Do you keep query logs? It would be useful to
try to correlate the temp files' PIDs and timestamps with the specific
queries that must have created them.

> Does this query look reasonable? What other things should I take into account before I start deleting files from the file system? Why might these files not be cleaned up on their own?

Personally, I'd not risk trying to match on PID; it should be sufficient
to delete anything with a timestamp older than the oldest active
backend. (Unless you've got some really long-lived sessions in
there...)

What PG version is this?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2010-11-08 21:18:42 Re: finding the other statement causing a sharelock
Previous Message Tom Lane 2010-11-08 20:51:44 Re: ERROR: Out of memory - when connecting to database

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2010-11-08 21:06:46 Re: W3C Specs: Web SQL
Previous Message Andrew Dunstan 2010-11-08 20:48:49 Re: Should we use make -k on the buildfarm?