Re: Megabytes of stats saved after every connection

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Megabytes of stats saved after every connection
Дата
Msg-id 87ack692dh.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Megabytes of stats saved after every connection  (Jan Wieck <JanWieck@Yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: GUID for postgreSQL
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Megabytes of stats saved after every connection