Re: temporary statistics option at initdb time

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: temporary statistics option at initdb time
Дата
Msg-id 7903.1219170895@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: temporary statistics option at initdb time  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: temporary statistics option at initdb time
Список pgsql-hackers
Magnus Hagander <magnus@hagander.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.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joshua Drake
Дата:
Сообщение: Re: Patch: plan invalidation vs stored procedures
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Adjusting debug_print_plan to be more useful by default