Re: clean out ./data/base/pgsql_tmp - Mailing list pgsql-general

From Thomas Munro
Subject Re: clean out ./data/base/pgsql_tmp
Date
Msg-id CAEepm=14adBp4L6xhBYtNuF+=+gd+s-waJ1=dJWA+VExV4m5-g@mail.gmail.com
Whole thread Raw
In response to clean out ./data/base/pgsql_tmp  (Dylan Luong <Dylan.Luong@unisa.edu.au>)
Responses RE: clean out ./data/base/pgsql_tmp
List pgsql-general
On Thu, Dec 7, 2017 at 5:18 PM, Dylan Luong <Dylan.Luong@unisa.edu.au> wrote:
> We have an issue where one of the developers ran a large query that hung was
> filling up the DATA drive very rapidly. From 50% usage to 95% in less than
> 2hrs.
>
> It created a very large pgsql_tmp size (300GB). To stop the drive filling up
> we had to kill the process manually using kill -9.
>
> How do we clean up the pgsql_tmp folder? Will Postgres periodically clean
> it? Ie CHECKPOINT?

Hi Dylan,

A clean shutdown/restart will clean it out.  A crash restart (as
happens if you kill processes like that) doesn't clear away pgsql_tmp
data on the theory that it might be useful for forensics.

-- 
Thomas Munro
http://www.enterprisedb.com


pgsql-general by date:

Previous
From: Dylan Luong
Date:
Subject: clean out ./data/base/pgsql_tmp
Next
From: Michael Paquier
Date:
Subject: Re: clean out ./data/base/pgsql_tmp