Re: valgrind a background worker

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jon Erdman <jon(at)thewickedtribe(dot)net>
Cc: pgsql-general(at)postgresql(dot)org <pgsql-general(at)postgresql(dot)org>
Subject: Re: valgrind a background worker
Date: 2023-02-10 15:03:52
Message-ID: 4076400.1676041432@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?UTF-8?Q?Jon_Erdman?= <jon(at)thewickedtribe(dot)net> writes:
> I've got a background worker that has a slow memory leak in it
> somewhere. How can I get it to start under valgrind to get a memcheck
> output from it?

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

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message vignesh C 2023-02-10 16:20:55 Re: Support logical replication of DDLs
Previous Message Masahiko Sawada 2023-02-10 14:52:41 Re: Support logical replication of DDLs