Re: Valgrind Memcheck support

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Valgrind Memcheck support
Дата
Msg-id CAM-w4HOo4aHsVMS22ShBGqz+jZcFyG2KuX4ftVQyomf28JsmHA@mail.gmail.com
обсуждение исходный текст
Ответ на Valgrind Memcheck support  (Noah Misch <noah@leadboat.com>)
Ответы Re: Valgrind Memcheck support  (Noah Misch <noah@leadboat.com>)
Re: Valgrind Memcheck support  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers

On Sun, Jun 9, 2013 at 10:25 PM, Noah Misch <noah@leadboat.com> wrote:
- Test recovery, such as by running a streaming replica under Memcheck while
  the primary runs "make installcheck-world".

In general we need a lot more testing on the recovery code.
 
- Memcheck has support for detecting leaks.  I have not explored that side at
  all, always passing --leak-check=no.  We could add support for freeing
  "everything" at process exit, thereby making the leak detection meaningful.

I think this is missing the type of leaks we actually care about. The way palloc works we can be virtually certain that if we did that we wouldn't have any leaks. All it would detect are the random one-off mallocs we know very well are there.

The problems we've had with leaks in the past are invariably things allocated at the "wrong" memory context. Things that can grow for every row processed but are stored per-query or for every query processed but stored per-sesson. To detect that will requires more of a heuristic where when a child memory context is reset any parent context growth is logged.

--
greg

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Custom Plan node
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [RFC] Extend namespace of valid guc names