Re: [PATCH] Report the query string that caused a memory error under Valgrind

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PATCH] Report the query string that caused a memory error under Valgrind
Дата
Msg-id 030bd02c-06c0-4975-7b92-a36704f73532@enterprisedb.com
обсуждение исходный текст
Ответ на [PATCH] Report the query string that caused a memory error under Valgrind  (Onur Tirtir <Onur.Tirtir@microsoft.com>)
Ответы RE: [EXTERNAL] Re: [PATCH] Report the query string that caused a memory error under Valgrind  (Onur Tirtir <Onur.Tirtir@microsoft.com>)
Список pgsql-hackers
On 31.01.23 15:00, Onur Tirtir wrote:
> We use Valgrind --together with the suppression file provided in 
> Postgres repo-- to test Citus extension against memory errors.
> 
> We replace /bin/postgres executable with a simple bash script that 
> executes the original postgres executable under Valgrind and then we run 
> our usual regression tests.
> 
> However, it is quite hard to understand which query caused a memory 
> error in the stack traces that has been dumped into valgrind logfile.
> 
> For this reason, we propose the attached patch to allow Valgrind to 
> report the query string that caused a memory error right after the 
> relevant stack trace.
> 
> I belive this would not only be useful for Citus but also for Postgres 
> and other extensions in their valgrind-testing process.

I can see how this could be useful.  But this only handles queries using 
the simple protocol.  At least the extended protocol should be handled 
as well.  Maybe it would be better to move this up to PostgresMain() and 
handle all protocol messages?




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

Предыдущее
От: Melanie Plageman
Дата:
Сообщение: Re: Add pg_walinspect function with block info columns
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Non-superuser subscription owners