pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: rihad <rihad@mail.ru>
Cc: pgsql-general General <pgsql-general@postgresql.org>
Subject: Re: Quere keep using temporary files
Date: Fri, 25 Oct 2019 13:33:38 -0400
Message-ID: <28142.1572024818@sss.pgh.pa.us> (raw)
In-Reply-To: <9a4aa120-0e0c-d546-e939-a99dc47b2a79@mail.ru>
References: <2c38ebb8-977e-926b-4842-5cf31c4059b2@mail.ru>
	<16916.1572011385@sss.pgh.pa.us>
	<9a4aa120-0e0c-d546-e939-a99dc47b2a79@mail.ru>

rihad <rihad@mail.ru> writes:
> On 10/25/2019 05:49 PM, Tom Lane wrote:
>> You'd need to provide a lot more detail about what that query is doing
>> for anyone to be able to guess where the temp file usage is coming from.

> I just checked and saw that the function "foo_xml_v2" above returns 
> table. Is this enough to trigger temporary file usage regardless of 
> work_mem?

No --- that would result in creation of a tuplestore to hold the function
result, but it shouldn't spill to disk until it exceeds work_mem ...
or at least so I'd expect.  Can you extract a self-contained case that
creates a small temp file?

			regards, tom lane





view thread (5+ messages)

Message-ID: <28142.1572024818@sss.pgh.pa.us>
Permalink:  ../28142.1572024818@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28142.1572024818@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, rihad@mail.ru
  Subject: Re: Quere keep using temporary files
  In-Reply-To: <28142.1572024818@sss.pgh.pa.us>
  References: <2c38ebb8-977e-926b-4842-5cf31c4059b2@mail.ru> <16916.1572011385@sss.pgh.pa.us> <9a4aa120-0e0c-d546-e939-a99dc47b2a79@mail.ru> <28142.1572024818@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