Re: Location for pgstat.stat

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Location for pgstat.stat
Дата
Msg-id 10918.1215008881@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Location for pgstat.stat  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Location for pgstat.stat  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> Tom Lane wrote:
>> It doesn't seem to me that it'd be hard to support two locations for the
>> stats file --- it'd just take another parameter to the read and write
>> routines.  pgstat.c already knows the difference between a normal write
>> and a shutdown write ...

> Right. Should it be removed from the permanent location when the server
> starts?

Yes, I would say so.  There are two possible exit paths: normal shutdown
(where we'd write a new file) and crash.  In a crash we'd wish to delete
the file anyway for fear that it's corrupted.
Startup: read permanent file, then delete it.
Post-crash: remove any permanent file (same as now)
Shutdown: write permanent file.
Normal stats collector write: write temp file.
Backend stats fetch: read temp file.
        regards, tom lane


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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: PATCH: CITEXT 2.0
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: WIP patch: reducing overhead for repeat de-TOASTing