Re: Moving pgstat.stat and pgstat.tmp

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Moving pgstat.stat and pgstat.tmp
Дата
Msg-id 20951.1196865569@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Moving pgstat.stat and pgstat.tmp  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-general
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> But then I thought, why do we need it to be a file
> at all?  Why not use a mmap'ed memory area or something like that, and
> only write it to a file on postmaster shutdown?

Yeah, we definitely need some other technology for this.  The difficulty
is in dealing with a highly variably sized chunk of data --- our
existing shmem approach won't work well, and once you get away from that
the old portability question raises its head.

There's also a synchronization issue: how can the stats collector make
updates appear atomic?  mmap by itself doesn't solve that AFAIK.

            regards, tom lane

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

Предыдущее
От: Stephane Bortzmeyer
Дата:
Сообщение: Re: SQL Query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Nested loop in simple query taking long time