pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Peter <pmc@citylink.dinoex.sub.org>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: SELECT creates millions of temp files in a single directory
Date: Sat, 23 Apr 2022 17:13:41 -0400
Message-ID: <3989726.1650748421@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwa8GK7EWBpEgjF9o+yFd6wXa1C2HaVRinNwg=t6vEs=iQ@mail.gmail.com>
References: <YmRYiVuzXa/SN8ZM@gate.intra.daemon.contact>
	<CAKFQuwZcRXCKceEckh4zrSpqJ_RA4=Dzx4Msw2hcpByz4XyWRA@mail.gmail.com>
	<3987446.1650747468@sss.pgh.pa.us>
	<CAKFQuwa8GK7EWBpEgjF9o+yFd6wXa1C2HaVRinNwg=t6vEs=iQ@mail.gmail.com>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> I'll add that given the nature of the problem that changing temp_file_limit
> away from its default of unlimited may be useful.
> https://www.postgresql.org/docs/current/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-DISK

Maybe ... that limits the total space involved, not the number of
files it's separated into, so I'm not sure how much it can help.

It might be worth playing around to see how varying values of work_mem
affect this behavior, too.  That should change the planner's initial
estimate of the number of hash batches needed, which likely plays into
this somehow.

			regards, tom lane





view thread (11+ messages)  latest in thread

Message-ID: <3989726.1650748421@sss.pgh.pa.us>
Permalink:  ../3989726.1650748421@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3989726.1650748421@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, pmc@citylink.dinoex.sub.org
  Subject: Re: SELECT creates millions of temp files in a single directory
  In-Reply-To: <3989726.1650748421@sss.pgh.pa.us>
  References: <YmRYiVuzXa/SN8ZM@gate.intra.daemon.contact> <CAKFQuwZcRXCKceEckh4zrSpqJ_RA4=Dzx4Msw2hcpByz4XyWRA@mail.gmail.com> <3987446.1650747468@sss.pgh.pa.us> <CAKFQuwa8GK7EWBpEgjF9o+yFd6wXa1C2HaVRinNwg=t6vEs=iQ@mail.gmail.com> <3989726.1650748421@sss.pgh.pa.us>

* 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