Re: Location for pgstat.stat

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: Location for pgstat.stat
Дата
Msg-id Pine.GSO.4.64.0807011539050.8907@westnet.com
обсуждение исходный текст
Ответ на Re: Location for pgstat.stat  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, 1 Jul 2008, Tom Lane wrote:

> Magnus Hagander <magnus@hagander.net> writes:
>> Tom Lane wrote:
>>> Hmm ... that would almost certainly result in the stats being lost over
>>> a system shutdown.  How much do we care?
>
>> Only for those who put it on a ramdrive. The default, unless you
>> move/sync it off, would still be the same as it is today. While not
>> perfect, the performance difference of going to a ramdrive might easily
>> be enough to offset that in some cases, I think.
>
> Well, what I was wondering about is whether it'd be worth adding logic
> to copy the file to/from a "safer" location at startup/shutdown.

Anyone who needs fast stats storage enough that they're going to symlink 
it to RAM should be perfectly capable of scripting server startup/shutdown 
to shuffle that to/from a more permanent location.  Compared to the admin 
chores you're likely to encounter before reaching that scale it's a pretty 
easy job, and it's not like losing that data file is a giant loss in any 
case.  The only thing I could see putting into the server code to help 
support this situation is rejecting an old stats file and starting from 
scratch instead if they restored a previous version after a crash that 
didn't save an updated copy.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Location for pgstat.stat
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Location for pgstat.stat