Re: More problems with VacuumPageHit style global variables

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: More problems with VacuumPageHit style global variables
Дата
Msg-id CAH2-WzkrCeBwKV-sA1Q8VW7Uf8ghuFyynWqF1gfNphZvkAMBBQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: More problems with VacuumPageHit style global variables  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On Thu, Apr 21, 2022 at 4:28 PM Peter Geoghegan <pg@bowt.ie> wrote:
> I don't think that there is any risk of one user of either variable
> "clobbering" some other user -- the current values of the variables
> are not actually meaningful at all. They're only useful as a way that
> an arbitrary piece of code instruments an arbitrary operation, by
> making their own copies, running whatever the operation is, and then
> reporting on the deltas. Which makes it even more surprising that this
> was overlooked until now.

I suppose code like pgstat_update_dbstats() would need to copy
pgBufferUsage somewhere if we were to get rid of pgStatBlockReadTime
and pgStatBlockWriteTime. That might not have been acceptable back
when we had the old stats collector; frequent copying of pgBufferUsage
might have non-trivial overhead. The relevant struct (BufferUsage) has
over 10 64-bit integers, versus only 2 for pgStatBlockReadTime and
pgStatBlockWriteTime.

But does that matter anymore now that we have the cumulative stats
system? Doesn't the redundancy seem like a problem?
-- 
Peter Geoghegan



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: More problems with VacuumPageHit style global variables
Следующее
От: Japin Li
Дата:
Сообщение: Re: Replace open mode with PG_BINARY_R/W/A macros