[HACKERS] Proposal: New LWLockmode LW_OWNER

2008-06-06 Thread Jignesh K. Shah
Currently there are two modes of LWLock : SHARED and EXCLUSIVE Mostly you need to have EXCLUSIVE lock mode to make any changes, add, delete and SHARED if you are just reading it. Multiple backends can grab SHARED mode simultaneously while only one Backend can grab EXCLUSIVE at a time. There

Re: [HACKERS] Proposal: New LWLockmode LW_OWNER

2008-06-06 Thread Tom Lane
Jignesh K. Shah [EMAIL PROTECTED] writes: New Lock Mode Proposed: LW_EX_OWNER (input on better name will be appreciated). This seems rather crazy, and you haven't actually given a single convincing use-case. Shouldn't you be trying to break down a lock into multiple locks instead of

Re: [HACKERS] Proposal: New LWLockmode LW_OWNER

2008-06-06 Thread Jignesh K. Shah
Tom Lane wrote: Jignesh K. Shah [EMAIL PROTECTED] writes: New Lock Mode Proposed: LW_EX_OWNER (input on better name will be appreciated). This seems rather crazy, and you haven't actually given a single convincing use-case. Shouldn't you be trying to break down a lock into

Re: [HACKERS] Proposal: New LWLockmode LW_OWNER

2008-06-06 Thread Alvaro Herrera
Tom Lane wrote: Jignesh K. Shah [EMAIL PROTECTED] writes: New Lock Mode Proposed: LW_EX_OWNER (input on better name will be appreciated). This seems rather crazy, and you haven't actually given a single convincing use-case. Shouldn't you be trying to break down a lock into multiple

Re: [HACKERS] Proposal: New LWLockmode LW_OWNER

2008-06-06 Thread Tom Lane
Jignesh K. Shah [EMAIL PROTECTED] writes: Tom Lane wrote: This seems rather crazy, and you haven't actually given a single convincing use-case. One area that I find it useful is where it will be useful is in ProcArrayEndTransaction where it uses exclusive to update proc array structure

Re: [HACKERS] Proposal: New LWLockmode LW_OWNER

2008-06-06 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Tom Lane wrote: Jignesh K. Shah [EMAIL PROTECTED] writes: New Lock Mode Proposed: LW_EX_OWNER (input on better name will be appreciated). We do something like this in the sinval code -- see SIGetDataEntry. Yeah, that analogy occurred to me later

Re: [HACKERS] Proposal: New LWLockmode LW_OWNER

2008-06-06 Thread Simon Riggs
On Fri, 2008-06-06 at 12:39 -0400, Tom Lane wrote: Jignesh K. Shah [EMAIL PROTECTED] writes: New Lock Mode Proposed: LW_EX_OWNER (input on better name will be appreciated). This seems rather crazy, and you haven't actually given a single convincing use-case. Shouldn't you be trying to

Re: [HACKERS] Proposal: New LWLockmode LW_OWNER

2008-06-06 Thread Jignesh K. Shah
Tom Lane wrote: Jignesh K. Shah [EMAIL PROTECTED] writes: Tom Lane wrote: This seems rather crazy, and you haven't actually given a single convincing use-case. One area that I find it useful is where it will be useful is in ProcArrayEndTransaction where it uses exclusive