Autovacuum PGPROCs in ProcGlobal? (was Re: autovacuum multiworkers) - Mailing list pgsql-patches

From Alvaro Herrera
Subject Autovacuum PGPROCs in ProcGlobal? (was Re: autovacuum multiworkers)
Date
Msg-id 20070412151410.GC15947@alvh.no-ip.org
Whole thread Raw
In response to Re: autovacuum multiworkers, patch 5  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Autovacuum PGPROCs in ProcGlobal? (was Re: autovacuum multiworkers)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Alvaro Herrera wrote:

> Oh, uh, the problem is that CreateSharedMemoryAndSemaphores wants to
> have access to the PGPROC already, but to obtain the PGPROC we need
> access to autovac shared memory (per AutoVacuumGetFreeProc).  So this
> wasn't too bright a choice :-(

It seems like I'll have to decouple autovacuum PGPROC's from
autovacuum's own shared memory.  The most sensible way to do this seems
to be to store them in ProcGlobal, along with the regular backend's
PGPROCs.  Is everyone OK with this plan?

Note that this will mean that those PGPROCs will be protected by the
same spinlock that protects the other PGPROCs.  I can't think of any
reason why this would be a problem, but if you think otherwise please
speak up.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-patches by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [HACKERS] Fix mdsync never-ending loop problem
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Fix mdsync never-ending loop problem