Re: Catching resource leaks during WAL replay

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Catching resource leaks during WAL replay
Дата
Msg-id CA+U5nMKuCxbxLHMbkgN8vyhZ18Y1RiwkByd7wz-2cvyfpdHZBA@mail.gmail.com
обсуждение исходный текст
Ответ на Catching resource leaks during WAL replay  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: Catching resource leaks during WAL replay  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 27 March 2013 20:40, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:

> While looking at bug #7969, it occurred to me that it would be nice if we
> could catch resource leaks in WAL redo routines better. It would be useful
> during development, to catch bugs earlier, and it could've turned that
> replay-stopping error into a warning.
>
> For regular transactions, we use ResourceOwners to track buffer pins (like
> in #7969) and other resources. There's no fundamental reason we couldn't use
> one during replay. After running a redo routine, there should be no buffer
> pins held or other resources held.
>
> Lwlocks are not tracked by resource owners, but we could still easily warn
> if any are held after the redo routine exits.

I'm inclined to think that the overhead isn't worth the trouble. This
is the only bug of its type we had in recent years.

Perhaps we need another level of compile for checks that happen only in beta?

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Allow external recovery_config_directory
Следующее
От: Xi Wang
Дата:
Сообщение: Re: [PATCH] avoid buffer underflow in errfinish()