Re: Avoid memory leaks during base backups

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Avoid memory leaks during base backups
Дата
Msg-id CA+TgmoaPfxcV9KSGQoaQEkDvTbuWYvA1yehQQS8PZgo+P0A4KA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Avoid memory leaks during base backups  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Avoid memory leaks during base backups  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Thu, Oct 20, 2022 at 1:35 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
> I think elsewhere in the code we reset dangling pointers either ways -
> before or after deleting/resetting memory context. But placing them
> before would give us extra safety in case memory context
> deletion/reset fails. Not sure what's the best way.

I think it's OK to assume that deallocating memory will always
succeed, so it doesn't matter whether you do it just before or just
after that. But it's not OK to assume that *allocating* memory will
always succeed.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: cross-platform pg_basebackup
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Decoupling antiwraparound autovacuum from special rules around auto cancellation