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