valgrind a background worker

2023-02-10 Thread Jon Erdman
Hi, 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? -- Jon Erdman (aka StuckMojo) PostgreSQL Zealot

Re: valgrind a background worker

2023-02-10 Thread Jon Erdman
(), as I see a palloc() in there and no associated pfree() in my background worker’s code, but looking at the elog backend code, it looks like maybe you only have to explicitly free buf if you relocate it larger? -- Jon Erdman > On Feb 10, 2023, at 9:03 AM, Tom Lane wrote: > > 

Re: valgrind a background worker

2023-02-11 Thread Jon Erdman
re'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. Thanks much both of you! I'll report back how it goes ;) -- Jon Erdman (aka StuckMojo) PostgreSQL Zealot

Re: valgrind a background worker

2023-03-16 Thread Jon Erdman
On 2/10/23 9:08 PM, Jon Erdman wrote: > On 2/10/23 3:05 PM, Tom Lane wrote: >> Jeffrey Walton writes: >>> On Fri, Feb 10, 2023 at 10:04 AM Tom Lane wrote: >>>> You have to valgrind the whole cluster AFAIK.  Basically, start >>>> the postmaster under va