Subject: pgsql_tmp consuming most of the space.

From: jayesh thakare <[email-masked]>
Date: Sat, 9 Nov 2024 10:10:44 +0530

Hi all,

In one of our production environment..

pgsql_tmp is taking about half of the space in FS.
And temp files are from Jan 2024.

Our data fs is about to reach 98% percent..

Kindly suggest us what should be done to resolve this issue?

pgsql_tmp contains temperorary files during sub query execution. Then why
files are not getting deleted automatically after query completion?

What are parameters that can be tuned to solve such issues in future?

Regards,
Jayeshthakare
Postgresql dba
Clover infotech

---

From: Ron Johnson <[email-masked]>
Date: Sat, 9 Nov 2024 00:04:09 -0500

> Kindly suggest us what should be done to resolve this issue?

Delete the pgsql_tmp file from *before* the last time the postmaster
started.

> files are not getting deleted automatically after query completion?

Queries crashing can cause it.  What version of PG are you running?

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!