Re: fork/exec
От | Tom Lane |
---|---|
Тема | Re: fork/exec |
Дата | |
Msg-id | 7337.1070243735@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: fork/exec (Claudio Natoli <claudio.natoli@memetrics.com>) |
Список | 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 по дате отправления: