Re: fork/exec - Mailing list pgsql-hackers-win32

From Tom Lane
Subject Re: fork/exec
Date
Msg-id 7337.1070243735@sss.pgh.pa.us
Whole thread Raw
In response to Re: fork/exec  (Claudio Natoli <claudio.natoli@memetrics.com>)
List pgsql-hackers-win32
Claudio Natoli <claudio.natoli@memetrics.com> writes:
> Agreed. But I think we'd also need to pass ProcGlobal and ProcStructLock,
> and move the InitProcess call to be made earlier (so that the MyProc
> structure is initialized, which is a requirement for locking). Right?

Hm, seems messy.  Note that setting up MyProc does *not* require LWLock
access, only a spinlock (which is obviously necessary to avoid
circularity).  It might be best to replace ShmemIndexLock with a spinlock
to reduce the amount of infrastructure that has to be live before we can
make use of the shmem index hashtable.  I think that ShmemIndexLock *was*
a spinlock originally, and converting it to an LWLock was something that
was done long after we'd abandoned fork/exec.  It seemed like a good
idea at the time, but now I'm wondering.

Bruce is right to note that we are not expecting much contention on
these locks, so changing them to spinlocks shouldn't really create any
performance issues.  I don't want to abandon locking entirely, but I do
think we can simplify the lock type if it helps make the startup
sequence easier.

            regards, tom lane

pgsql-hackers-win32 by date:

Previous
From: Claudio Natoli
Date:
Subject: Re: fork/exec
Next
From: Claudio Natoli
Date:
Subject: Re: fork/exec