pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <rjuju123@gmail.com>
To: Wells Oliver <wells.oliver@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Temp getting written to disk despite being smaller than temp_buffers?
Date: Sat, 24 Jun 2023 07:36:26 +0800
Message-ID: <20230623233626.3h2vcgbhlmpzcbh3@jrouhaud> (raw)
In-Reply-To: <CAOC+FBU+0O9cNT2294rXCH+pT2KpSDQ1YsbP1ZE_2VXUxb5yYA@mail.gmail.com>
References: <CAOC+FBU+0O9cNT2294rXCH+pT2KpSDQ1YsbP1ZE_2VXUxb5yYA@mail.gmail.com>

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.





view thread (2+ messages)

Message-ID: <20230623233626.3h2vcgbhlmpzcbh3@jrouhaud>
Permalink:  ../20230623233626.3h2vcgbhlmpzcbh3@jrouhaud/
Also on:    postgresql.org/message-id/20230623233626.3h2vcgbhlmpzcbh3@jrouhaud

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: rjuju123@gmail.com, wells.oliver@gmail.com
  Subject: Re: Temp getting written to disk despite being smaller than temp_buffers?
  In-Reply-To: <20230623233626.3h2vcgbhlmpzcbh3@jrouhaud>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox