Re: 9.3.2 server creates hundreds of thousands of temporary files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Florian Weimer <fweimer(at)redhat(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: 9.3.2 server creates hundreds of thousands of temporary files
Date: 2014-01-22 17:56:12
Message-ID: 14263.1390413372@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Florian Weimer <fweimer(at)redhat(dot)com> writes:
> I've got a query which causes PostgreSQL to create hundreds of thousands
> of temporary files, many of them empty. The process also needs a lot of
> memory. I suspect this is due to bookkeeping for those files.

> The query looks like this:
> [ huge hash join ]

> I track this down to a lower-than-usual setting of work_mem, to 1MB,
> after the upgrade to 9.3.

The system is trying to do the join with only 1MB of workspace, so
yes, you end up with lots and lots of small temporary files.

> Is this a bug?

No.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Leonard Boyce 2014-01-22 18:02:56 Composite Foreign Key performance
Previous Message Merlin Moncure 2014-01-22 17:08:41 Re: question on writing a function