Re: [PATCHES] Patch to log usage of temporary files - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] Patch to log usage of temporary files
Date
Msg-id 20938.1168536925@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] Patch to log usage of temporary files  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: [PATCHES] Patch to log usage of temporary files  ("Jim C. Nasby" <jim@nasby.net>)
Re: [PATCHES] Patch to log usage of temporary files  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.com> writes:
>> Tom Lane wrote:
>>> 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.

> We had that discussion already. If you only pass it after the stat()
> then you cannot use DTrace, except when you already get a message in the
> log and therefore don't need DTrace.

We may have had the discussion, but apparently you didn't follow it :-(.
The point of the proposal was that if you wanted to DTrace temp files you
would set log_temp_files to some large value, thus causing the stat()
call to occur but no log message to come out.  This is surely a lot more
efficient than having to have DTrace open the file for itself --- and
if you don't care about micro-efficiency, what's wrong with using the
logging option?

> You can't say we don't have many probes so we won't add one. There never
> will be many if we do that - its a circular argument.

I think the real criterion has to be "is this probe useful to
developers?".  I'm entirely uninterested in adding probes that are
targeted towards DBAs, as this one would have been --- if we think
there's a problem that a DBA would have, we need to offer a more
portable solution than that.  Which we did, in the form of a logging
option, which makes the DTrace probe pretty useless anyway.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: -f option for pg_dumpall
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Patch to log usage of temporary files