Re: Unkillable processes creating millions of tiny temp files

From: Jan Wieck <jan(at)wi3ck(dot)info>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jerry Sievers <gsievers19(at)comcast(dot)net>
Cc: Jeremy Finzel <finzelj(at)gmail(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unkillable processes creating millions of tiny temp files
Date: 2021-03-20 19:13:09
Message-ID: e6280492-a7d7-1d97-f682-c7bba5c300c9@wi3ck.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2021-03-20 20:00:13 Re: More than one UNIQUE key when matching items..
Previous Message Allan Kamau 2021-03-20 19:01:05 Re: More than one UNIQUE key when matching items..