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

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: [PATCHES] Patch to log usage of temporary files
Дата
Msg-id 1167838544.3903.537.camel@silverbirch.site
обсуждение исходный текст
Ответ на Re: [PATCHES] Patch to log usage of temporary files  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCHES] Patch to log usage of temporary files  (Bill Moran <wmoran@collaborativefusion.com>)
Список pgsql-hackers
On Tue, 2007-01-02 at 18:20 -0500, Tom Lane wrote:
> Bill Moran <wmoran@collaborativefusion.com> writes:
> > In response to Alvaro Herrera <alvherre@commandprompt.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
  EnterpriseDB   http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: TODO: GNU TLS
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Rare corruption of pg_class index