Re: Unkillable processes creating millions of tiny temp files - Mailing list pgsql-general

From Jan Wieck
Subject Re: Unkillable processes creating millions of tiny temp files
Date
Msg-id e6280492-a7d7-1d97-f682-c7bba5c300c9@wi3ck.info
Whole thread Raw
List pgsql-general
On 3/5/21 6:57 PM, Tom Lane wrote:

> Not sure how fast that is either.  If you need to do it again, you could
> try manually rm'ing everything under the pgsql_tmp directory before
> letting the postmaster start.
That is actually a strategy that works rather well. mv(1) the tmp 
directory to something date(1) based, then kick off a recursive rm(1) 
-rf on everything named pgsql_tmp_*. That won't miss anything in the 
case the whole server is restarted while the procedure is under way. It 
can cause multiple rm(1) processes trampling over each other, but that 
has no real ill side effects. They are just trying to unlink a file 
another one already did.

Under normal circumstances the rm(1) will clean up while the postmaster 
is already up and possibly created a new pgsql_tmp.


Regards, Jan

-- 
Jan Wieck
Principle Database Engineer
Amazon Web Services



pgsql-general by date:

Previous
From: Allan Kamau
Date:
Subject: Re: More than one UNIQUE key when matching items..
Next
From: Laurenz Albe
Date:
Subject: Re: More than one UNIQUE key when matching items..