Re: Fwd: temp_file_limit?

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Frits Jalvingh <jal(at)etc(dot)to>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Fwd: temp_file_limit?
Date: 2022-12-19 17:15:43
Message-ID: 20221219171543.GZ1153@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Dec 19, 2022 at 05:57:42PM +0100, Frits Jalvingh wrote:
> @justin:
>
> Ran the query again. Top shows the following processes:
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+

Thanks

> root(at)chatelet:/d2/var/lib/postgresql/15/main/base# du --max=2 -mx
> ./pgsql_tmp |sort -nr
> 412021 ./pgsql_tmp/pgsql_tmp650830.3.fileset
> 412021 ./pgsql_tmp
> ^^^ a few seconds after this last try the query aborted:
> ERROR: temporary file size exceeds temp_file_limit (104857600kB)
>
> One possibility is that there are files in the tmpdir, which have been
> > unlinked, but are still opened, so their space hasn't been reclaimed.
> > You could check for that by running lsof -nn |grep pgsql_tmp Any deleted
> > files would say things like 'DEL|deleted|inode|no such'
>
> I do not really understand what you would like me to do, and when. The disk
> space is growing, and it is actual files under pgsql_tmp?

Run this during the query as either postgres or root:
| lsof -nn |grep pgsql_tmp |grep -E 'DEL|deleted|inode|no such'

Any files it lists would be interesting to know about.

> Hope this tells you something, please let me know if you would like more
> info, and again - thanks!

I think Thomas' idea is more likely. We'd want to know the names of
files being written, either as logged by log_temp_files or from
| find pgsql_tmp -ls
during the query.

--
Justin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Frits Jalvingh 2022-12-19 17:27:57 Re: Fwd: temp_file_limit?
Previous Message Frits Jalvingh 2022-12-19 16:57:42 Re: Fwd: temp_file_limit?