Re: Announcing Veil - Mailing list pgsql-hackers
From | Bruce Momjian |
---|---|
Subject | Re: Announcing Veil |
Date | |
Msg-id | 200510070341.j973faY09166@candle.pha.pa.us Whole thread Raw |
In response to | Re: Announcing Veil (Marc Munro <marc@bloodnok.com>) |
Responses |
Re: Announcing Veil
|
List | 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@bloodnok.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@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
pgsql-hackers by date: