Re: Temp getting written to disk despite being smaller than temp_buffers?

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Temp getting written to disk despite being smaller than temp_buffers?
Date: 2023-06-23 23:36:26
Message-ID: 20230623233626.3h2vcgbhlmpzcbh3@jrouhaud
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

On Fri, Jun 23, 2023 at 11:20:02AM -0700, Wells Oliver wrote:
> Probably reading my logs wrong or misunderstanding something basic but my
> temp_buffers is 512MB and I see things in the log like:
>
> 2023-06-23 18:02:44 UTC:172.31.21.22(40866):woliver(at)db:[25473]:LOG:
> temporary file: path "base/pgsql_tmp/pgsql_tmp25473.135", size 255107072
>
> Wondering why 255mb is being written to disk rather than using RAM?

temp_buffers is for temporary tables, while those temporary files are used for
node operations that consume more than work_mem.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message ROHIT SACHDEVA 2023-06-25 08:51:28 Fix buffer refcount leak with FDW bulk inserts
Previous Message Wells Oliver 2023-06-23 18:20:02 Temp getting written to disk despite being smaller than temp_buffers?