Search Postgresql Archives

Re: valgrind a background worker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



=?UTF-8?Q?Jon_Erdman?= <jon@xxxxxxxxxxxxxxxxxx> 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






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux