Re: Temp getting written to disk despite being smaller than temp_buffers? - Mailing list pgsql-admin

From Julien Rouhaud
Subject Re: Temp getting written to disk despite being smaller than temp_buffers?
Date
Msg-id 20230623233626.3h2vcgbhlmpzcbh3@jrouhaud
Whole thread Raw
In response to Temp getting written to disk despite being smaller than temp_buffers?  (Wells Oliver <wells.oliver@gmail.com>)
List 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@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.



pgsql-admin by date:

Previous
From: Wells Oliver
Date:
Subject: Temp getting written to disk despite being smaller than temp_buffers?
Next
From: ROHIT SACHDEVA
Date:
Subject: Fix buffer refcount leak with FDW bulk inserts