Re: optimizing CleanupTempFiles - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: optimizing CleanupTempFiles
Date
Msg-id 20080917213452.GF3855@alvh.no-ip.org
Whole thread Raw
In response to Re: optimizing CleanupTempFiles  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: optimizing CleanupTempFiles  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: optimizing CleanupTempFiles  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: optimizing CleanupTempFiles  (Simon Riggs <simon@2ndQuadrant.com>)
Re: optimizing CleanupTempFiles  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs wrote:
>
> On Wed, 2008-09-17 at 16:25 -0400, Alvaro Herrera wrote:
>
> > We've been profiling a large system (8 CPUs, 64 GB of memory, some
> > dozens of disks) which seems rather more swamped than it should.  Part
> > of the problem seems to come from CleanupTempFiles, the second entry in
> > oprofile output.
>
> I'm glad you've observed this also. I saw it about two years ago but
> wasn't able to convince anyone else it existed at the time.

I couldn't find it in the archives.

> Simple solution is to have a state variable so you can see whether a
> backend has created an temp files in this transaction. Most don't, so I
> think the above two solutions are overkill. If we created any, scan for
> them, if not, don't. Just a simple boolean state, just as we have for
> AtEOXact_RelationCache().

Ah -- like this?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Attachment

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: optimizing CleanupTempFiles
Next
From: Alvaro Herrera
Date:
Subject: Re: optimizing CleanupTempFiles