Re: temporary statistics option at initdb time

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Decibel!" <decibel(at)decibel(dot)org>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-hackers(at)postgresql(dot)org, Euler Taveira de Oliveira <euler(at)timbira(dot)com>
Subject: Re: temporary statistics option at initdb time
Date: 2008-08-25 15:10:54
Message-ID: 48B2CB7E.3070507@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> Actually, I think maybe not so hard. Attached is a patch that fixes
>> this. It's done by keeping the old filename around. When you change the
>> path, the stats collector will start writing the new file the next time
>> it writes something (which should be max 0.5 seconds later if something
>> is happening). The backends will immediately try to read from the new
>> filename, but if that one is not found, they will switch to reading the
>> old filename. This obviously fails if you change the temp directory
>> twice in less than half a second, but I really don't see a use-case for
>> that...
>
> I think this is introducing complication and race conditions to solve a
> problem that no one will really care about. Just let people change the
> filename at SIGHUP and document that doing that on-the-fly may cause
> stats queries to fail for a short interval.

Ok, I'll do it that way.

//Magnus

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-08-25 15:24:23 Another refactoring proposal: move stuff into nodes/nodeFuncs.[ch]
Previous Message Tom Lane 2008-08-25 14:48:19 Re: IN, BETWEEN, spec compliance, and odd operator names