Re: replication slot stats memory bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: replication slot stats memory bug
Дата
Msg-id 3654384.1616024206@sss.pgh.pa.us
обсуждение исходный текст
Ответ на replication slot stats memory bug  (Andres Freund <andres@anarazel.de>)
Ответы Re: replication slot stats memory bug  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> I saw a leak in pgstat_read_statsfiles(), more precisely:
>     /* Allocate the space for replication slot statistics */
>     replSlotStats = palloc0(max_replication_slots * sizeof(PgStat_ReplSlotStats));

Yeah, I just found that myself.  I think your fix is good.

> But it seems like we just shouldn't allocate it dynamically at all?
> max_replication_slots doesn't change during postmaster lifetime, so it
> seems like it should just be allocated once?

Meh.  I don't see a need to wire in such an assumption here.

            regards, tom lane



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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Getting better results from valgrind leak tracking