Re: Avoid memory leaks during base backups

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Avoid memory leaks during base backups
Дата
Msg-id CALj2ACV+9P4TobZMNSMv1buQF_QTvT+R-XX69jtv56+kKBDbMg@mail.gmail.com
обсуждение исходный текст
Ответ на Avoid memory leaks during base backups  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Wed, Sep 28, 2022 at 10:09 AM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> Here's what I think - for backup functions, we
> can have the new memory context child of TopMemoryContext and for
> perform_base_backup(), we can have the memory context child of
> CurrentMemoryContext. With PG_TRY()-PG_FINALLY()-PG_END_TRY(), we can
> delete those memory contexts upon ERRORs. This approach works for us
> since backup-related code doesn't have any FATALs.
>
> Thoughts?

I'm attaching the v2 patch designed as described above. Please review it.

I've added an entry in CF - https://commitfest.postgresql.org/40/3915/

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Вложения

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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: A doubt about a newly added errdetail
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: A doubt about a newly added errdetail