Re: more autovacuum fixes - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: more autovacuum fixes
Date
Msg-id 20070620173054.GM30369@alvh.no-ip.org
Whole thread Raw
In response to Re: more autovacuum fixes  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-patches
Alvaro Herrera wrote:
> Alvaro Herrera wrote:
>
> > Turns out that this problem is not serious at all, because if that
> > palloc() fails, the whole postmaster will exit with a FATAL out of
> > memory message.
> >
> > The problems in the worker code after fork are still an issue though.
>
> It _is_ still an issue -- and a very serious issue at that.  If a worker
> fails before getting its entry from the startingWorker pointer, then
> (patched) autovacuum will no longer run any task.

I figured that I could keep the old check there for when the worker
failed, but still add the new signalling mechanism so that a fork()
failure (which I would think is the most likely of all) is taken care of
in a more timely manner.

I've also improved the rest of the code and comments a bit, and the new
code does seem better now.  So I'll go ahead and commit it later today.

--
Alvaro Herrera                         http://www.flickr.com/photos/alvherre/
"Uno puede defenderse de los ataques; contra los elogios se esta indefenso"

Attachment

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] 'Waiting on lock'
Next
From: Gregory Stark
Date:
Subject: Re: [HACKERS] 'Waiting on lock'