Re: SLRU statistics

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SLRU statistics
Дата
Msg-id 2668.1589384295@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SLRU statistics  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: SLRU statistics  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Список pgsql-hackers
Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> I think it counts as a variable with "static storage duration" per 6.7.8
> (para 10), see [1]. I wasn't aware of this either, but it probably means
> the memset is unnecessary.
> Also, it seems a bit strange/confusing to handle this differently from
> BgWriterStats. And that worked fine without the init for years ...

Yeah, exactly.

There might be merit in memsetting it if we thought that it could have
become nonzero in the postmaster during a previous shmem cycle-of-life.
But the postmaster really shouldn't be accumulating such counts; and
if it is, then we have a bigger problem, because child processes would
be inheriting those counts via fork.

I think this change is unnecessary and should be reverted to avoid
future confusion about whether somehow it is necessary.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Add "-Wimplicit-fallthrough" to default flags
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions