Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Patch to log usage of temporary files

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>,"Bill Moran" <wmoran(at)collaborativefusion(dot)com>,"Alvaro Herrera" <alvherre(at)commandprompt(dot)com>,<pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Patch to log usage of temporary files
Date: 2007-01-03 15:35:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
On Tue, 2007-01-02 at 18:20 -0500, Tom Lane wrote:
> Bill Moran <wmoran(at)collaborativefusion(dot)com> writes:
> > In response to Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> >> Please change things to save the stat() syscall when the feature is not
> >> in use.
> > Do you have a suggestion on how to do that and still have the PG_TRACE1()
> > work?  That was specifically requested by Simon Riggs.
> Well, we are NOT paying a stat() call on every single file close,
> whether Simon wants it or not.  

Simon doesn't/wouldn't want the stat() call on each file close.

If you put the PG_TRACE macro outside of the if test, yet prior to the
file close, you can pass the filename through like this

	PG_TRACE1(temp__file__cleanup, vfdP->fileName);

That way DTrace can make its own call to find out filesize, if it would
like to... and we don't need to stat() before each temp file close.
That's much more flexible and useful, as well as better performance.

  Simon Riggs             

In response to


pgsql-hackers by date

Next:From: Jim NasbyDate: 2007-01-03 15:40:38
Subject: Re: TODO: Add a GUC to control whether BEGIN inside
Previous:From: Jim NasbyDate: 2007-01-03 15:33:35
Subject: Re: effective_cache_size vs units

pgsql-patches by date

Next:From: Bill MoranDate: 2007-01-03 21:20:53
Subject: Re: [HACKERS] Patch to log usage of temporary files
Previous:From: Zeugswetter Andreas ADI SDDate: 2007-01-03 11:18:42
Subject: Re: Load distributed checkpoint

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group