Re: Megabytes of stats saved after every connection - Mailing list pgsql-general

From Greg Stark
Subject Re: Megabytes of stats saved after every connection
Date
Msg-id 87ack692dh.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Megabytes of stats saved after every connection  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-general
Jan Wieck <JanWieck@Yahoo.com> writes:

> Then again, the stats file is only written. There is nothing that actually
> forces the blocks out. On a busy system, one individual stats file will be
> created, written to, renamed, live for 500ms and be thrown away by the next
> stat files rename operation. I would assume that with a decent filesystem and
> appropriate OS buffers, none of the data blocks of most stat files even hit the
> disk. I must be missing something.

Renaming is a metadata operation. Depending on the filesystem it has to be
done either synchronously or force a log write barrier. I'm not sure how those
things are implemented in various filesystems but I could easily imagine some
implementations treating them as implicit fsyncs for that file.

Perhaps this user could put the stats file in a ramdisk. It doesn't sound like
losing it in a crash would be anything to worry about.

--
greg

pgsql-general by date:

Previous
From: Chris Browne
Date:
Subject: Re: GUID for postgreSQL
Next
From: Greg Stark
Date:
Subject: Re: Megabytes of stats saved after every connection