From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>, "'pgsql-patches(at)postgresql(dot)org'" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: fork/exec patch |
Date: | 2003-12-16 05:11:04 |
Message-ID: | 18723.1071551464@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-hackers-win32 pgsql-patches |
Neil Conway <neilc(at)samurai(dot)com> writes:
> Why did you change ShmemIndexLock from an LWLock to a spinlock?
That one I can answer --- it's a bootstrapping issue: we can't use
LWLocks until we have a PGProc (*MyProc), and we can't set that up
without looking in the ShmemIndex for the related data structures.
So ShmemIndex needs to use a more primitive lock type. This is actually
the way the code used to do it; I changed the lock type when the
opportunity presented itself, but if we're going to support fork/exec
again then we have to go back to how it was done before.
Your other comments seem pretty germane to me, except for
> I wonder whether it is cleaner to make these properly public, rather
> than using the NON_EXEC_STATIC #ifdef... (I'm not necessarily saying
> it is, I'm just tossing it out there).
I don't want to make these things public, because we don't really want
any other modules accessing them. NON_EXEC_STATIC is pretty ugly,
but it does guarantee that we will soon find out about any unintended
cross-module references, because they won't compile on Unix systems.
If you've got an idea about a cleaner way to do it, I'm all ears ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2003-12-16 07:44:43 | Re: fork/exec patch |
Previous Message | Bruce Momjian | 2003-12-16 05:06:03 | Re: fork/exec patch |
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2003-12-16 07:44:43 | Re: fork/exec patch |
Previous Message | Bruce Momjian | 2003-12-16 05:06:03 | Re: fork/exec patch |
From | Date | Subject | |
---|---|---|---|
Next Message | Claudio Natoli | 2003-12-16 07:31:20 | Re: fork/exec patch |
Previous Message | Bruce Momjian | 2003-12-16 05:06:03 | Re: fork/exec patch |