Re: Announcing Veil

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Marc Munro <marc(at)bloodnok(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, veil-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Announcing Veil
Date: 2005-10-07 03:41:36
Message-ID: 200510070341.j973faY09166@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I don't see NUM_USER_DEFINED_LWLOCKS defined in 8.0 or 8.1, so what
system do you propose to allow you to set this value?

---------------------------------------------------------------------------

Marc Munro wrote:
-- Start of PGP signed section.
> Tom,
> Thanks for your reponse. Unless I am missing your point, to add more
> locks we require a minor code change to the postgres server. I am happy
> to submit a patch but this will not help Veil work with existing
> versions of Postgres. I am aiming for compatibility with 7.4 onward.
> Your views on this would be appreciated.
>
> Assuming that simply allocating a few extra LWLocks for user-defined
> functions is acceptable, here are some patches:
>
> --cut---------------
> *** ./src/backend/storage/lmgr/lwlock.c Sat Aug 20 16:26:24 2005
> --- lwlock.c Wed Oct 5 08:20:31 2005
> ***************
> *** 120,126 ****
> */
> numLocks += 2 * NUM_SLRU_BUFFERS;
>
> ! /* Perhaps create a few more for use by user-defined modules? */
>
> return numLocks;
> }
> --- 120,127 ----
> */
> numLocks += 2 * NUM_SLRU_BUFFERS;
>
> ! /* Create a few more for use by user-defined modules. */
> ! numLocks += NUM_USER_DEFINED_LWLOCKS;
>
> return numLocks;
> }
> --cut---------------
> *** ./src/include/storage/lwlock.h Sat Aug 20 16:26:34 2005
> --- lwlock.h Wed Oct 5 08:22:26 2005
> ***************
> *** 53,58 ****
> --- 53,62 ----
> MaxDynamicLWLock = 1000000000
> } LWLockId;
>
> + /*
> + * Allocate a few LWLocks for user-defined functions.
> + */
> + #define NUM_USER_DEFINED_LWLOCKS 4
>
> typedef enum LWLockMode
> {
> --cut---------------
>
>
> __
> Marc Munro
>
> On Tue, 2005-10-04 at 22:51 -0400, Tom Lane wrote:
> > Marc Munro <marc(at)bloodnok(dot)com> writes:
> > > Since I was unable to dynamically assign a LWLock using
> > > LWLockAssign (none available), I have fairly arbitrarily overloaded the
> > > use of existing LWLocks. When the flames die down perhaps we can
> > > discuss making a small number (one would be enough for me) of LWLocks
> > > available.
> >
> > Perhaps you missed the comment in NumLWLocks()?
> >
> > regards, tom lane
-- End of PGP section, PGP failed!

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-10-07 03:51:08 Re: Announcing Veil
Previous Message Tom Lane 2005-10-07 03:31:46 Re: [HACKERS] Patching dblink.c to avoid warning about open transaction