From: | "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> |
---|---|
To: | "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Memory leak in vac_update_relstats ? |
Date: | 2007-07-20 17:44:05 |
Message-ID: | 2e78013d0707201044p51ad174v3d55c9d875bba3ba@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 7/20/07, Heikki Linnakangas <heikki(at)enterprisedb(dot)com> wrote:
>
> Pavan Deolasee wrote:
> > Are we leaking memory in vac_update_relstats ?
> >
> > /* Fetch a copy of the tuple to scribble on */
> > ctup = SearchSysCacheCopy(RELOID,
> > ObjectIdGetDatum(relid),
> > 0, 0, 0);
> >
> > This copy is not subsequently freed in the function.
>
> It's palloc'd in the current memory context, so it's not serious. It'll
> be freed at the end of the transaction, if not before that. That's the
> beauty of memory contexts; no need to worry about small allocations like
> that.
Right. But may be for code completeness, we should add that
missing heap_freetuple.
Thanks,
Pavan
--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-07-20 17:56:01 | Re: 8.2.4 signal 11 with large transaction |
Previous Message | Pavan Deolasee | 2007-07-20 17:42:34 | Re: MAXIMUM_ALIGNOF on Windows-32 |