Re: Location for pgstat.stat

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Location for pgstat.stat
Date: 2008-07-01 19:48:56
Message-ID: Pine.GSO.4.64.0807011539050.8907@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 1 Jul 2008, Tom Lane wrote:

> Magnus Hagander <magnus(at)hagander(dot)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(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-07-01 20:02:26 Re: Location for pgstat.stat
Previous Message Magnus Hagander 2008-07-01 19:34:45 Re: Location for pgstat.stat