Re: BUG #16739: Temporary files not deleting from data folder on disk

Maxim Boguk <maxim.boguk@gmail.com>

From: Maxim Boguk <maxim.boguk@gmail.com>
To: Manoj Kumar <manojkumar@ameyo.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2020-11-24T18:51:04Z
Lists: pgsql-bugs
On Tue, Nov 24, 2020 at 5:57 PM Manoj Kumar <manojkumar@ameyo.com> wrote:

> I have checked the files, but these files are temporary and vanish once
> the Postgres service is restarted.
> This has been seen many times.
>
> Adding more data to support my point in form of attachment.
>

It seems that these temp files are the result of normal query execution
(and will be cleared when query finishes).

Have you tried enabling log_temp_files and check what query generates these
temp files?
It is a very common situation when a single badly written query generates
hundred gigabytes of temp files until the end of disk space.
Alternatively, you can try enabling temp_file_limit to limit the maximum
size of temp files per query.

Kind regards,
Maxim


-- 
Maxim Boguk
Senior Postgresql DBA
https://dataegret.com/

Phone RU: +7  985 433 0000
Phone UA: +380 99 143 0000
Phone AU: +61  45 218 5678

LinkedIn: http://www.linkedin.com/pub/maksym-boguk/80/b99/b1b
Skype: maxim.boguk

"Доктор, вы мне советовали так не делать, но почему мне по-прежнему больно
когда я так делаю ещё раз?"