Re: bgwriter stats

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: bgwriter stats
Дата
Msg-id 45FEEC3D.9080700@hagander.net
обсуждение исходный текст
Ответ на Re: bgwriter stats  (Neil Conway <neilc@samurai.com>)
Ответы Re: bgwriter stats  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
Neil Conway wrote:
> Magnus Hagander wrote:
>> Anyway. Attached patch adds this to the bgwriter shared memory. Is it
>> safe to do this, and then just have a regular function running in a
>> normal backend pulling out the value and returning it to the user,
>> without locking?
> If the variable is an int64, I don't believe so: the architecture might
> not implement atomic read/writes of int64 values.

Ok. But it should be safe if it's int32?

Actually, since it's just statistics data, it wouldn't be a problem that
it's not atomic, I think. If we really unlucky, we'll get the wrong
value once. But most systems that poll such statistics can deal with
that, in my experience.

Then again, a normal int shouldn't be a problem either.

//Magnus

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: bgwriter stats
Следующее
От: Neil Conway
Дата:
Сообщение: Re: bgwriter stats