Re: [HACKERS] this is in plain text (row level locks)

2003-08-14 Thread Jenny -
From: Tom Lane <[EMAIL PROTECTED]> To: "Jenny -" <[EMAIL PROTECTED]> Subject: Re: [HACKERS] this is in plain text (row level locks) Date: Sat, 02 Aug 2003 23:28:30 -0400 > if row-level locks are not recorded in proclock or any other shared memory > datastruct

Re: [HACKERS] this is in plain text (row level locks)

2003-08-06 Thread Tom Lane
"Jenny -" <[EMAIL PROTECTED]> writes: > so even though the application locks a row in a table, table-level locks are > automatically taken by postgesql ? why is that? So that the table doesn't disappear while you're trying to scan it. (Or afterwards --- a row-level lock wouldn't be noticed by DR

Re: [HACKERS] this is in plain text (row level locks)

2003-07-30 Thread Sailesh Krishnamurthy
> "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: Tom> Personally I'd feel more comfortable with a shared-lock Tom> approach, if we could work out the scalability issues. Dirty Tom> reads seem ... well ... dirty. Tom I was going to do some experiments to measure the costs of our

Re: [HACKERS] this is in plain text (row level locks)

2003-07-30 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I was thinking of adding to TODO: > > * Allow shared row locks for referential integrity > > but how is that different from: > > * Implement dirty reads and use them in RI triggers > > It'd be a completely different approach t

Re: [HACKERS] this is in plain text (row level locks)

2003-07-30 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I was thinking of adding to TODO: > * Allow shared row locks for referential integrity > but how is that different from: > * Implement dirty reads and use them in RI triggers It'd be a completely different approach to solving the FK locking p

Re: [HACKERS] this is in plain text (row level locks)

2003-07-30 Thread Bruce Momjian
I was thinking of adding to TODO: * Allow shared row locks for referential integrity but how is that different from: * Implement dirty reads and use them in RI triggers --- Tom Lane wrote: > Rod T

Re: [HACKERS] this is in plain text (row level locks)

2003-07-24 Thread Sailesh Krishnamurthy
> "Bruce" == Bruce Momjian <[EMAIL PROTECTED]> writes: >> -- Pip-pip Sailesh http://www.cs.berkeley.edu/~sailesh Bruce> ^^^ Watch out, that code from Bruce> Berkeley usually is a mess. :-) LOL ! That's why we release the code - in the hope of getting r

Re: [HACKERS] this is in plain text (row level locks)

2003-07-24 Thread Sailesh Krishnamurthy
> "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: Tom> Sailesh Krishnamurthy <[EMAIL PROTECTED]> writes: >> We implemented a Shared Memory MemoryContext using OSSP libmm >> (used in Apache) for TelegraphCQ. Tom> How portable is that? What kind of real-world performance do T

Re: [HACKERS] this is in plain text (row level locks)

2003-07-24 Thread Tom Lane
Sailesh Krishnamurthy <[EMAIL PROTECTED]> writes: > We implemented a Shared Memory MemoryContext using OSSP libmm (used in > Apache) for TelegraphCQ. How portable is that? What kind of real-world performance do you get? regards, tom lane ---(end

Re: [HACKERS] this is in plain text (row level locks)

2003-07-24 Thread Bruce Momjian
Sailesh Krishnamurthy wrote: > > "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: > > Tom> Sailesh Krishnamurthy <[EMAIL PROTECTED]> writes: > >> Why not have the traditional approach of a lock table in shared > >> memory, growing and shrinking as appropriate, > > Tom> Because we

Re: [HACKERS] this is in plain text (row level locks)

2003-07-24 Thread Sailesh Krishnamurthy
> "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: Tom> Sailesh Krishnamurthy <[EMAIL PROTECTED]> writes: >> Why not have the traditional approach of a lock table in shared >> memory, growing and shrinking as appropriate, Tom> Because we can't grow shared memory. Whatever size w

Re: [HACKERS] this is in plain text (row level locks)

2003-07-24 Thread Tom Lane
Sailesh Krishnamurthy <[EMAIL PROTECTED]> writes: > Why not have the traditional approach of a lock table in shared > memory, growing and shrinking as appropriate, Because we can't grow shared memory. Whatever size we get at startup is what we're stuck with. (I suppose we could try asking the ke

Re: [HACKERS] this is in plain text (row level locks)

2003-07-24 Thread Sailesh Krishnamurthy
> "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: Tom> Rod Taylor <[EMAIL PROTECTED]> writes: >> It may be best to have a locking manager run as a separate >> process. That way it could store locks in ram or spill over to >> disk. Tom> Hmm, that might be workable. We could

Re: [HACKERS] this is in plain text (row level locks)

2003-07-24 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> writes: > It may be best to have a locking manager run as a separate process. > That way it could store locks in ram or spill over to disk. Hmm, that might be workable. We could imagine that in place of the HEAP_MARKED_FOR_UPDATE status bit, we have a "this row is

Re: [HACKERS] this is in plain text (row level locks)

2003-07-24 Thread Rod Taylor
On Thu, 2003-07-24 at 02:45, Sailesh Krishnamurthy wrote: > > "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: > > Tom> That doesn't work, unless you insist that the first backend > Tom> can't exit its transaction until all the other ones are done. > Tom> Which introduces its own poss

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Sailesh Krishnamurthy
> "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: Tom> That doesn't work, unless you insist that the first backend Tom> can't exit its transaction until all the other ones are done. Tom> Which introduces its own possibilities for deadlock --- but Tom> even worse, how does the fir

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I suppose we could allow one backend to mark the page with a shared lock > for primary key purposes while others read it. Does that buy us > anything? That doesn't work, unless you insist that the first backend can't exit its transaction until all the o

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> This is actually an issue though. Row-level shared locks would be > >> really nice to have for foreign-key handling. Right now we have to > >> use X locks for those, and that leads to deadlocking problems for > >

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> This is actually an issue though. Row-level shared locks would be >> really nice to have for foreign-key handling. Right now we have to >> use X locks for those, and that leads to deadlocking problems for >> applications. > Is the pl

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Sailesh Krishnamurthy wrote: > >> Does pgsql only record X locks on the individual tuples on-disk or > >> does it do so for S locks as well ? > > > We don't need to shared lock individual rows because of MVCC --- well, > > we sort of

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Mike Mascari
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > >>Sailesh Krishnamurthy wrote: >> >>>Does pgsql only record X locks on the individual tuples on-disk or >>>does it do so for S locks as well ? > > >>We don't need to shared lock individual rows because of MVCC --- well, >>we sort of

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Sailesh Krishnamurthy wrote: >> Does pgsql only record X locks on the individual tuples on-disk or >> does it do so for S locks as well ? > We don't need to shared lock individual rows because of MVCC --- well, > we sort of do by recording our xid in ou

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Bruce Momjian
Sailesh Krishnamurthy wrote: > > "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: > > Tom> "Jenny -" <[EMAIL PROTECTED]> writes: > >> Iam trying to acquire rowlevel locks in postgresql. I try doing > >> this: 'select * from students where name='Larry' for update; > >> But by looki

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Sailesh Krishnamurthy
> "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: Tom> "Jenny -" <[EMAIL PROTECTED]> writes: >> Iam trying to acquire rowlevel locks in postgresql. I try doing >> this: 'select * from students where name='Larry' for update; >> But by looking at the holding array of proclock , I'v

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Tom Lane
"Jenny -" <[EMAIL PROTECTED]> writes: > Iam trying to acquire rowlevel locks in postgresql. I try doing this: > 'select * from students where name='Larry' for update; > But by looking at the holding array of proclock , I've noticed that by doing > this only > AccessShareLock gets acquired which is