Skip site navigation (1) Skip section navigation (2)

Re: fork/exec patch

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32pgsql-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

In response to

Responses

pgsql-hackers by date

Next:From: Neil ConwayDate: 2003-12-16 07:44:43
Subject: Re: fork/exec patch
Previous:From: Bruce MomjianDate: 2003-12-16 05:06:03
Subject: Re: fork/exec patch

pgsql-patches by date

Next:From: Claudio NatoliDate: 2003-12-16 07:31:20
Subject: Re: fork/exec patch
Previous:From: Bruce MomjianDate: 2003-12-16 05:06:03
Subject: Re: fork/exec patch

pgsql-hackers-win32 by date

Next:From: Neil ConwayDate: 2003-12-16 07:44:43
Subject: Re: fork/exec patch
Previous:From: Bruce MomjianDate: 2003-12-16 05:06:03
Subject: Re: fork/exec patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group