Tom Lane escribió:
> "Pavan Deolasee" <pavan.deolasee@gmail.com> writes:
> > I also noticed that inside autovacuum_do_vac_analyze(), we save the old
> > context (which is TopTransactionContext) and restore it back after vacuum()
> > returns. But vacuum() might have started a new transaction invalidating the
> > saved context. Do we see any problem here ?
>
> I agree, that looks pretty darn bogus.
Sorry, I failed to notice this part of Pavan's reply. Thanks for
patching it.
> The other problem with it is that it's running vacuum() in an
> indefinite-lifespan context. Perhaps that has something to do with
> the report we saw awhile back of autovac leaking memory ...
Hmm, I'm not sure which memory leak are you referring to, but if it's
the same I'm thinking of, then it cannot be the same because this one
occurs on the worker and the other was on the launcher; also, I patched
that one:
----------------------------
revision 1.58
date: 2007-09-12 18:14:59 -0400; author: alvherre; state: Exp; lines: +20 -3;Fix a memory leak in the autovacuum
launchercode. Noted by Darcy Buskermolen,
who reported it privately to me.
----------------------------
Hmm, well, if he reported it privately to me then you cannot have heard
of it, right? So perhaps it is indeed a different one ...
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support