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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Bruce Momjian" <bruce(at)momjian(dot)us>, "Bill Moran" <wmoran(at)collaborativefusion(dot)com>, pgsql-hackers(at)postgresql(dot)org, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] [PATCHES] Patch to log usage of temporary files
Date: 2007-01-11 17:35:25
Message-ID: 20938.1168536925@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Simon Riggs" <simon(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-01-11 17:37:18 Re: [HACKERS] [PATCHES] Patch to log usage of temporary files
Previous Message Bruce Momjian 2007-01-11 17:35:20 Re: -f <output file> option for pg_dumpall

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-01-11 17:37:18 Re: [HACKERS] [PATCHES] Patch to log usage of temporary files
Previous Message Simon Riggs 2007-01-11 17:08:22 Re: [HACKERS] [PATCHES] Patch to log usage of temporary files