| From: | Bill Moran <wmoran(at)collaborativefusion(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: [HACKERS] Patch to log usage of temporary files |
| Date: | 2007-01-09 22:32:13 |
| Message-ID: | 20070109173213.504bd275.wmoran@collaborativefusion.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
In response to Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Bruce Momjian <bruce(at)momjian(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2007-01-09 22:34:33 | Re: [HACKERS] Patch to log usage of temporary files |
| Previous Message | Bruce Momjian | 2007-01-09 22:29:34 | Re: [HACKERS] Patch to log usage of temporary files |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2007-01-09 22:34:33 | Re: [HACKERS] Patch to log usage of temporary files |
| Previous Message | Bruce Momjian | 2007-01-09 22:29:34 | Re: [HACKERS] Patch to log usage of temporary files |