Re: Quere keep using temporary files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rihad <rihad(at)mail(dot)ru>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Quere keep using temporary files
Date: 2019-10-25 17:33:38
Message-ID: 28142.1572024818@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

rihad <rihad(at)mail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Lewis 2019-10-25 18:57:57 Re: Composite type storage overhead
Previous Message Michael Lewis 2019-10-25 17:27:45 Re: Trying to fetch records only if preceded by at least another one