Re: [HACKERS] relcache refcount

2004-05-23 Thread Alvaro Herrera
On Sat, May 15, 2004 at 02:08:39PM -0400, Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Regarding the lock mechanism, I simply added some code to LockReleaseAll > > so it gets the array of committed child Xids; on subtransaction abort, > > the whole lock struct is scanned just li

Re: [HACKERS] relcache refcount

2004-05-16 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Regarding the lock mechanism, I simply added some code to LockReleaseAll > so it gets the array of committed child Xids; on subtransaction abort, > the whole lock struct is scanned just like it's done on main transaction > abort; only those locks affilia

Re: [HACKERS] relcache refcount

2004-05-14 Thread Alvaro Herrera
On Fri, May 14, 2004 at 11:21:42PM -0400, Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Ok, I created a function to copy a hash table (from dynahash). So now > > at subtransaction start the RelationIdCache and RelationSysNameCache > > hash tables are copied, and if the subtransa

Re: [HACKERS] relcache refcount

2004-05-14 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Ok, I created a function to copy a hash table (from dynahash). So now > at subtransaction start the RelationIdCache and RelationSysNameCache > hash tables are copied, and if the subtransaction aborts the previous > hash tables are restored. I don't thi

Re: [HACKERS] relcache refcount

2004-05-14 Thread Bruce Momjian
Alvaro Herrera wrote: > PS: Either the list server is getting very slow or it has started to > lose mail. I asked yesterday whether it was OK to copy the hash but > apparently the mail didn't make it to the list. Is there something > happening? Not sure. I can confirm I never saw that email. -

Re: [HACKERS] relcache refcount

2004-05-14 Thread Alvaro Herrera
On Thu, May 13, 2004 at 09:43:42AM -0400, Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > I'm stuck trying to figure out how to decrease reference counting for > > relcache entries at subtransaction abort. > > > Initially I thought I could just drop them all to zero, > > Nope, yo

Re: [HACKERS] relcache refcount

2004-05-14 Thread Zeugswetter Andreas SB SD
> > Why can't we keep all locks until main tx end ? > > For committed subtransactions we have to do that, yes, but for aborted > subtransactions we must release. Otherwise you can't implement a retry > loop around a potentially-deadlocking operation. Ok, that would certainly be good to have, bu

Re: [HACKERS] relcache refcount

2004-05-14 Thread Tom Lane
"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes: > Why can't we keep all locks until main tx end ? For committed subtransactions we have to do that, yes, but for aborted subtransactions we must release. Otherwise you can't implement a retry loop around a potentially-deadlocking operation.

Re: [HACKERS] relcache refcount

2004-05-14 Thread Zeugswetter Andreas SB SD
> BTW, what are your plans for state saving/reversion for the lock manager > and buffer manager? The lock state, in particular, makes these other > problems look trivial by comparison. Why can't we keep all locks until main tx end ? Locks are not self conflicting are they ? So the only reason to

Re: [HACKERS] relcache refcount

2004-05-13 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > I'm stuck trying to figure out how to decrease reference counting for > relcache entries at subtransaction abort. > Initially I thought I could just drop them all to zero, Nope, you can't. An active query plan will surely have open relations. > Incid

[HACKERS] relcache refcount

2004-05-12 Thread Alvaro Herrera
Hackers, I'm stuck trying to figure out how to decrease reference counting for relcache entries at subtransaction abort. Initially I thought I could just drop them all to zero, because a subtransaction boundary should be enough warranty that the entries are no longer needed. However I now think