Re: BUG #16739: Temporary files not deleting from data folder on disk - Mailing list pgsql-bugs

From Adrien Nayrat
Subject Re: BUG #16739: Temporary files not deleting from data folder on disk
Date
Msg-id 0f1e42e7-b5c0-526a-b783-3515f67a8928@anayrat.info
Whole thread Raw
In response to Re: BUG #16739: Temporary files not deleting from data folder on disk  (Adrien Nayrat <adrien.nayrat@anayrat.info>)
Responses Re: BUG #16739: Temporary files not deleting from data folder on disk  (Dilip Kumar <dilipbalaut@gmail.com>)
List pgsql-bugs
On 6/5/23 11:54, Adrien Nayrat wrote:
> Hello,
> 
> 
> I am experiencing the same issue on an up-to-date Postgres (13.11).
> I have many files corresponding to temporary tables (for example 
> t7_4191281453.90). These files are not cleaned until we manually restart 
> Postgres (all client session are closed).
> 
> When temporary table were created, we reached disk full (Disk quota 
> exceeded). Then the instance crashed and restarted in recovery mode. But 
> files related to temporary tables still exist.
> 
> It seems there is something missing to clean these files after a recovery ?
> 
> Regards,
> 

Replying to myself when reading this item in PG 14 release notes:

Remove temporary files after backend crashes (Euler Taveira)

Previously, such files were retained for debugging purposes. If 
necessary, deletion can be disabled with the new server parameter 
remove_temp_files_after_crash.


I understand, it is expected to keep these files for debugging purpose 
after a recovery. And since 14, we can ask Postgres to clean them thanks 
to remove_temp_files_after_crash



pgsql-bugs by date:

Previous
From: Adrien Nayrat
Date:
Subject: Re: BUG #16739: Temporary files not deleting from data folder on disk
Next
From: Dilip Kumar
Date:
Subject: Re: BUG #16739: Temporary files not deleting from data folder on disk