Hi Ashesh,
I just added condition before delete the job otherwise it looks good. Correct me if I am wrong.
if (job != NULL)
{
delete job;
job = NULL;
}
I have created two instances of pgagent on database cluster. As of now not able to see any leak and keep you updated if found anything.
@Robert - Can you also test at your environment and keep us updated for any leak ?
Thanks,
Neel Patel