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 19:56:21 |
Message-ID: | 86420.1676058981@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’m suspecting that the leak might be coming from initStringInfo(), 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?
Usually it's more like "you need to pfree if you allocated in a long-lived
memory context". elog is working in ErrorContext which it expects will
be reset when the dust settles.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2023-02-10 20:07:57 | Re: PostgreSQL 13.9.3 Uninstall fails with "Unable to initialize any installation mode" |
Previous Message | Lawrence, Mike (DTST) | 2023-02-10 19:47:33 | RE: PostgreSQL 13.9.3 Uninstall fails with "Unable to initialize any installation mode" |