Re: Huge number of disk writes after migration to 8.1

Поиск
Список
Период
Сортировка
От Chris Campbell
Тема Re: Huge number of disk writes after migration to 8.1
Дата
Msg-id 7183C23F-98E3-4C93-8B5B-49EDA82A5F17@bignerdranch.com
обсуждение исходный текст
Ответ на Re: Huge number of disk writes after migration to 8.1  ("Magnus Hagander" <mha@sollentuna.net>)
Ответы Re: Huge number of disk writes after migration to 8.1  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-bugs
On Jan 19, 2006, at 06:51, Magnus Hagander wrote:

> In most cases you're going to see extremely few reads compared to
> writes
> on pg_stats, right? So why not have the backends connect to the stats
> process (or perhaps use UDP, or use the pipe, or whatever) and
> fetch the
> data when needed. So when nobody fetches any data, there is no
> overhead
> (except for the stats process adding up values, of course).

Do the stats need to persist across postmaster restarts (or crashes)?
If so, then they need to be written to disk at some point, so we
can't get rid of the stats file and the frequent writes to it. Or
maybe there could be a GUC setting for persisting stats -- if it's
enabled, it works as implemented today (flushed to disk every 500ms).
If it's disabled, the stats are only stored in-memory and never
written to a file; the postmaster could automatically do an "ANALYZE"
on startup to fill the in-memory stats.

We could move the stat file writes to happen only at a checkpoint.
Backends would get up-to-date info directly from the stats process as
you described, but it would always be persisted at a checkpoint.
Those *should* be less-frequent than every half a second. :)

- Chris

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

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Huge number of disk writes after migration to 8.1
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Huge number of disk writes after migration to 8.1