Re: fork/exec

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

Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)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

In response to

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Claudio Natoli 2003-12-01 03:50:27 Re: fork/exec
Previous Message Claudio Natoli 2003-12-01 00:37:23 Re: fork/exec