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 13:49:45
Message-ID: 16916.1572011385@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

rihad <rihad(at)mail(dot)ru> writes:
> Hi, we frequently run many query involving XML that use a smallish
> temporary file, despite having increased local work_mem in that
> transaction to 16GB. FreeBSD's top shows that the memory isn't actually
> being used - it remains free. Basically many such queries are run within
> a single transaction:

> LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp92452.1079", size 166518
> STATEMENT:  DELETE FROM "foo" WHERE ((col1, col2, col3) in (select col1,
> col2, col3 from foo_xml_v2('<here goes xml-formatted blob>'))) AND
> "foo"."col_id" IN ($1, $2, $3, $4, $5, $6, $7, $8, $9)

> It looks like increasing work_mem doesn't help. Surely 16GB is enough to
> cover all these small temp files?

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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-10-25 13:53:46 Re: Error building Postgres for Windows
Previous Message Yessica Brinkmann 2019-10-25 11:37:06 I think that my data is saved correctly, but when printing again, other data appears