Re: valgrind a background worker - Mailing list pgsql-general

From Tom Lane
Subject Re: valgrind a background worker
Date
Msg-id 231809.1676063110@sss.pgh.pa.us
Whole thread Raw
In response to Re: valgrind a background worker  (Jeffrey Walton <noloader@gmail.com>)
Responses Re: valgrind a background worker  (Jon Erdman <jon@thewickedtribe.net>)
List pgsql-general
Jeffrey Walton <noloader@gmail.com> writes:
> On Fri, Feb 10, 2023 at 10:04 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> You have to valgrind the whole cluster AFAIK.  Basically, start
>> the postmaster under valgrind with --trace-children=yes.
>> For leak tracking you probably also want
>> --leak-check=full --track-origins=yes --read-var-info=yes

> One additional comment... the program in question and PostgreSQL
> should also be built with -g -O1 per
> https://valgrind.org/docs/manual/quick-start.html . Otherwise, there's
> a risk the line information will not be accurate or usable.

Yeah.  Also, you need to compile Postgres with -DUSE_VALGRIND
if you want valgrind to have any idea about palloc/pfree.

            regards, tom lane



pgsql-general by date:

Previous
From: Jeffrey Walton
Date:
Subject: Re: valgrind a background worker
Next
From: Jon Erdman
Date:
Subject: Re: valgrind a background worker