Thread: pgsql_tmp consuming most of the space.

pgsql_tmp consuming most of the space.

From
jayesh thakare
Date:
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


Re: pgsql_tmp consuming most of the space.

From
Ron Johnson
Date:
On Fri, Nov 8, 2024 at 11:51 PM jayesh thakare <thakarejayesh700@gmail.com> wrote:
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?

Delete the pgsql_tmp file from before the last time the postmaster started.
 
pgsql_tmp contains temperorary files during sub query execution. Then why files are not getting deleted automatically after query completion?

Queries crashing can cause it.  What version of PG are you running?
 
What are parameters that can be tuned to solve such issues in future?



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