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

Поиск
Список
Период
Сортировка
От Bill Moran
Тема Re: [PATCHES] Patch to log usage of temporary files
Дата
Msg-id 20070109173213.504bd275.wmoran@collaborativefusion.com
обсуждение исходный текст
Ответ на 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  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [PATCHES] Patch to log usage of temporary files  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
In response to Tom Lane <tgl@sss.pgh.pa.us>:

> Bruce Momjian <bruce@momjian.us> writes:
> > Tom Lane wrote:
> >> Surely the measurement unit should be kbytes or disk blocks.  And why
> >> aren't you using that GUC UNITS infrastructure Peter put in?
>
> > Agreed.  I have applied the following patch to make it kilobytes, and
> > documented it.  I didn't put '-1kB' in the postgresql.conf file because
> > the -1 value is special.  (ideas?)
>
> Hmm, that could be a little bit ugly.  Suggestion: redefine the value
> such that files *greater than* the given size are logged,

It already is that way, with 0 effectively meaning "log all".

> and then zero
> can be the "off" position, and we need not worry about whether -1 is
> -1 byte or -1 kbyte.

All doing this does is make it impossible to log temp files of 1 byte.
I thought the -1 = magic off was more intuitive.  But 0 = off isn't
terribly cryptic or anything.

I'd considered creating two GUC variables: a boolean log_temp_files and
an int log_temp_file_max_size, or something like that, but it seemed
like overkill if I could just use a magic value from the int.

Someone (I don't remember who) suggested that it might be useful to
also have the ability to log temp files _smaller_ than a certain size.
Allowing _either_ larger than _or_ smaller than will certainly complicate
the config options.  I had this devilish master plan that - values would
be less than and positive values greater than, then I decided I was
being stupid.

So, that's my input.  But, at this point I'm not entirely sure what the
best approach is.

--
Bill Moran
Collaborative Fusion Inc.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] Patch to log usage of temporary files
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] Patch to log usage of temporary files