Re: base directory size getting increased

Поиск
Список
Период
Сортировка
От Atul Kumar
Тема Re: base directory size getting increased
Дата
Msg-id CA+ONtZ5zX3w3tZVSRx10yfRoN=hgWoSxKUBh9k3dkE7tTQ3sgg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: base directory size getting increased  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: base directory size getting increased  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general
Hi,

Is there any way to check which temporary file is being used by which query.


Any query/ view to check it, could you share or suggest ?

Is there any way to be safe while deleting such files.








Regards 
Atul







On Monday, June 7, 2021, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Mon, 2021-06-07 at 17:48 +0530, Atul Kumar wrote:
> initially pgsql_tmp size was 87 GB and after execution of query it was
> started increasinng beyond 87GBs so yes, pgsql_tmp directory size is
> getting increased while exporting  data into csv file.
>
> But once I rolled back the query, pgsql_tmp directory it was back to
> 87 GBs so please help me in telling how do I clean that 87GB of space
> of pgsql_tmp directory.

The files in that directory will always be cleaned up when the
query that uses the temporary files is done.
The backend process ID of the query is part of the temporary file name.

It could be that such files are left behind after a crash.
If you are sure that the don't belong to a running query (for example,
if their modification timestamp is old), you can delete them.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Alan Hodgson
Дата:
Сообщение: Re: Database issues when adding GUI
Следующее
От: Tom Lane
Дата:
Сообщение: Re: bottom / top posting