Re: [PATCHES] Patch to log usage of temporary files
| От | Tom Lane |
|---|---|
| Тема | Re: [PATCHES] Patch to log usage of temporary files |
| Дата | |
| Msg-id | 10830.1168379458@sss.pgh.pa.us обсуждение |
| Ответ на | Re: [PATCHES] Patch to log usage of temporary files (Bruce Momjian <bruce@momjian.us>) |
| Ответы |
Re: [PATCHES] Patch to log usage of temporary files
|
| Список | pgsql-hackers |
Bruce Momjian <bruce@momjian.us> writes:
> + A value of zero logs all temporary files, and positive
> + values log only files whose size is equal or greater than
> + the specified number of bytes.
Surely the measurement unit should be kbytes or disk blocks. And why
aren't you using that GUC UNITS infrastructure Peter put in?
> /* reset flag so that die() interrupt won't cause problems */
> vfdP->fdstate &= ~FD_TEMPORARY;
> + PG_TRACE1(temp__file__cleanup, vfdP->fileName);
> + if (log_temp_files >= 0)
> + {
> + if (stat(vfdP->fileName, &filestats) == 0)
The TRACE is in the wrong place no? I thought it was going to be after
the stat() operation so it could pass the file size.
Also, I dunno much about DTrace, but I had the idea that you can't
simply throw a PG_TRACE macro into the source and think you are done
--- isn't there a file of probe declarations to add to? Not to mention
the documentation of what probes exist.
regards, tom lane
В списке pgsql-hackers по дате отправления: