Re: fork/exec

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
Cc: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: fork/exec
Date: 2003-11-30 15:47:27
Message-ID: 200311301547.hAUFlRX26284@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

Claudio Natoli wrote:
> One slight circular problem with that. Currently, ShmemInitStruct waits on a
> lock (ShmemIndexLock), locks require the MyProc structure (set by
> InitProcess), and InitProcess needs access to... a bunch of shared memory
> structs :-)
>
> Would it be possible to re-jig ShmemInitStruct to not require locking (at
> least for backend initialization)? Other ideas?

At the time the postmaster is to populate that area, there is on one
else running, so you don't need locking, and the backends are going to
only be reading that area, so I don't think they need a lock. Of
course, you might need to put all that stuff at the start of shared
memory so the backends know where to find it.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bruce Momjian 2003-11-30 15:48:45 Re: fork/exec
Previous Message Claudio Natoli 2003-11-30 13:11:54 Re: fork/exec