agora inbox for pgsql-admin@postgresql.org  
help / color / mirror / Atom feed
From: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: small temp files
Date: Mon, 22 Jul 2024 15:00:30 +0200
Message-ID: <a9dee6e8-6197-d9bb-028e-6d020167bf57@jakobs.com> (raw)
In-Reply-To: <7A0C9A69-5632-4CFC-B156-53FAAAB33E26@elevated-dev.com>
References: <7A0C9A69-5632-4CFC-B156-53FAAAB33E26@elevated-dev.com>

Am 22.07.24 um 14:50 schrieb Scott Ribe:
> What would be the cause of small temp files? For example:
>
> temporary file: path "base/pgsql_tmp/pgsql_tmp1261242.83979", size 7452
>
> work_mem is set to 128MB
>
>
> --
> Scott Ribe
> scott_ribe@elevated-dev.com
> https://www.linkedin.com/in/scottribe/
>
>
Typically, queries which need a lot of memory (RAM) create temp files if 
work_mem isn't sufficient for some sorting or hash algorithms.

Increasing work_mem will help, but small temp files don't create any 
trouble.

You can set work_mem within each session, don't set it high globally.

Regards,

Holger


>
>
-- 

Holger Jakobs, Bergisch Gladbach



Attachments:

  [application/pgp-signature] OpenPGP_signature (202B, ../a9dee6e8-6197-d9bb-028e-6d020167bf57@jakobs.com/2-OpenPGP_signature)
  download

view thread (8+ messages)  latest in thread

Message-ID: <a9dee6e8-6197-d9bb-028e-6d020167bf57@jakobs.com>
Permalink:  ../a9dee6e8-6197-d9bb-028e-6d020167bf57@jakobs.com/
Also on:    postgresql.org/message-id/a9dee6e8-6197-d9bb-028e-6d020167bf57@jakobs.com

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: holger@jakobs.com, pgsql-admin@lists.postgresql.org
  Subject: Re: small temp files
  In-Reply-To: <a9dee6e8-6197-d9bb-028e-6d020167bf57@jakobs.com>

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

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