Re: [PATCHES] more autovacuum fixes

2007-06-20 Thread Alvaro Herrera
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 _

Re: [PATCHES] more autovacuum fixes

2007-06-20 Thread Alvaro Herrera
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

Re: [PATCHES] more autovacuum fixes

2007-06-19 Thread Alvaro Herrera
Alvaro Herrera wrote: > One problem with the patch is this (new code): > > bn = (Backend *) malloc(sizeof(Backend)); > ! if (bn) > { > ! bn->pid = StartAutoVacWorker(); > ! bn->is_autovacuum = true; > ! /* we don't need a cancel key */ > > ! if (bn->pid > 0) >

Re: [PATCHES] more autovacuum fixes

2007-06-19 Thread Alvaro Herrera
Alvaro Herrera wrote: > One problem with the patch is this (new code): > > bn = (Backend *) malloc(sizeof(Backend)); > ! if (bn) > { > ! bn->pid = StartAutoVacWorker(); > ! bn->is_autovacuum = true; > ! /* we don't need a cancel key */ > > ! if (bn->pid > 0) >

[PATCHES] more autovacuum fixes

2007-06-19 Thread Alvaro Herrera
I attach a patch to fix some issues in the autovac process handling code. Mainly, instead of rechecking periodically in the launcher whether a worker was able to start or not, what we do is signal it from the postmaster when it fails. In order to do this I had to make the postmaster set a flag in