Re: [HACKERS] Need help understanding pg_locks

2011-07-15 Thread Bruce Momjian
Thanks, applied. --- Florian Pflug wrote: > On Jul14, 2011, at 22:18 , Bruce Momjian wrote: > > !OID of the database in which the lock target exists, or > > !zero if the lock is a shared object, or > > !

Re: [HACKERS] Need help understanding pg_locks

2011-07-14 Thread Bruce Momjian
Looks good to me. --- Florian Pflug wrote: > On Jul14, 2011, at 22:18 , Bruce Momjian wrote: > > !OID of the database in which the lock target exists, or > > !zero if the lock is a shared object, or > > !

Re: [HACKERS] Need help understanding pg_locks

2011-07-14 Thread Florian Pflug
On Jul14, 2011, at 22:18 , Bruce Momjian wrote: > !OID of the database in which the lock target exists, or > !zero if the lock is a shared object, or > !null if the lock is on a transaction ID For consistency, I think it should say "target" in the second part of the sentenc

Re: [HACKERS] Need help understanding pg_locks

2011-07-14 Thread Bruce Momjian
Florian Pflug wrote: > I still believe the chance of confusion to be extremely small, but since > you feel otherwise, what about "Targeted" instead of "Locked". As in > > OID of the relation targeted by the lock, or null if the lock does not > target a relation or part of a relation. > > Pa

Re: [HACKERS] Need help understanding pg_locks

2011-07-14 Thread Florian Pflug
On Jul14, 2011, at 19:06 , Bruce Momjian wrote: > Florian Pflug wrote: >> On Jul13, 2011, at 21:08 , Bruce Momjian wrote: >>> + OID of the relation lock target, or null if the lock is not >>> on a relation or part of a relation >> >> That, however, not so much. "relation lock target" m

Re: [HACKERS] Need help understanding pg_locks

2011-07-14 Thread Bruce Momjian
Florian Pflug wrote: > On Jul13, 2011, at 21:08 , Bruce Momjian wrote: > > - OID of the database in which the object exists, or > > - zero if the object is a shared object, or > > - null if the lock object is on a transaction ID > > + OID of the database in which the lock ta

Re: [HACKERS] Need help understanding pg_locks

2011-07-13 Thread Florian Pflug
On Jul13, 2011, at 21:08 , Bruce Momjian wrote: > - OID of the database in which the object exists, or > - zero if the object is a shared object, or > - null if the lock object is on a transaction ID > + OID of the database in which the lock target exists, or > + zero

Re: [HACKERS] Need help understanding pg_locks

2011-07-13 Thread Bruce Momjian
Andrew Dunstan wrote: > > > On 07/13/2011 12:31 PM, Tom Lane wrote: > > Bruce Momjian writes: > >> Tom Lane wrote: > >>> I think you misunderstood the suggestion. This is not an improvement, > >>> it's just more confusion. > >> Well, I thought the "lock on" wording helped avoid the confusion bu

Re: [HACKERS] Need help understanding pg_locks

2011-07-13 Thread Bruce Momjian
Florian Pflug wrote: > We could also get rid of the noun completely by saying > > (D) > "Locked page number within the relation, or null if it isn't >a tuple or relation page that is locked". > > I personally slightly favor (D). I don't think we can use "Locked" here because the lock mig

Re: [HACKERS] Need help understanding pg_locks

2011-07-13 Thread Andrew Dunstan
On 07/13/2011 12:31 PM, Tom Lane wrote: Bruce Momjian writes: Tom Lane wrote: I think you misunderstood the suggestion. This is not an improvement, it's just more confusion. Well, I thought the "lock on" wording helped avoid the confusion but obviously I didn't understand more than that.

Re: [HACKERS] Need help understanding pg_locks

2011-07-13 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> I think you misunderstood the suggestion. This is not an improvement, >> it's just more confusion. > Well, I thought the "lock on" wording helped avoid the confusion but > obviously I didn't understand more than that. We did have similar > confusion wh

Re: [HACKERS] Need help understanding pg_locks

2011-07-13 Thread Bruce Momjian
Florian Pflug wrote: > On Jul13, 2011, at 17:44 , Tom Lane wrote: > > Bruce Momjian writes: > >> OK, I went with this wording, using "lock object is on" terminology. > >> Applied patch attached --- adjustments welcomed. > > > > I think you misunderstood the suggestion. This is not an improvemen

Re: [HACKERS] Need help understanding pg_locks

2011-07-13 Thread Florian Pflug
On Jul13, 2011, at 17:44 , Tom Lane wrote: > Bruce Momjian writes: >> OK, I went with this wording, using "lock object is on" terminology. >> Applied patch attached --- adjustments welcomed. > > I think you misunderstood the suggestion. This is not an improvement, > it's just more confusion. F

Re: [HACKERS] Need help understanding pg_locks

2011-07-13 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > OK, I went with this wording, using "lock object is on" terminology. > > Applied patch attached --- adjustments welcomed. > > I think you misunderstood the suggestion. This is not an improvement, > it's just more confusion. Well, I thought the "lock

Re: [HACKERS] Need help understanding pg_locks

2011-07-13 Thread Tom Lane
Bruce Momjian writes: > OK, I went with this wording, using "lock object is on" terminology. > Applied patch attached --- adjustments welcomed. I think you misunderstood the suggestion. This is not an improvement, it's just more confusion. regards, tom lane -- Sent vi

Re: [HACKERS] Need help understanding pg_locks

2011-07-13 Thread Bruce Momjian
Florian Pflug wrote: > On Jul11, 2011, at 17:31 , Bruce Momjian wrote: > > Tom Lane wrote: > >> Florian Pflug writes: > >>> On Jul11, 2011, at 17:11 , Tom Lane wrote: > Yeah, I think this patch is going in the wrong direction altogether. > It would be better to modify the description of

Re: [HACKERS] Need help understanding pg_locks

2011-07-11 Thread Kevin Grittner
Bruce Momjian wrote: > OK, so as I understand it, in pg_locks: > > Column | Type | Modifiers > +--+--- >locktype | text | >database | oid | >relation | oid | >page

Re: [HACKERS] Need help understanding pg_locks

2011-07-11 Thread Florian Pflug
On Jul11, 2011, at 17:31 , Bruce Momjian wrote: > Tom Lane wrote: >> Florian Pflug writes: >>> On Jul11, 2011, at 17:11 , Tom Lane wrote: Yeah, I think this patch is going in the wrong direction altogether. It would be better to modify the description of virtualtransaction and pid t

Re: [HACKERS] Need help understanding pg_locks

2011-07-11 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> Maybe we could just add a paragraph above the "pg_locks Columns" table >> that says explicitly that virtualtransaction and pid describe the entity >> holding or awaiting the lock, and the others describe the object being >> locked? Any way you slice it,

Re: [HACKERS] Need help understanding pg_locks

2011-07-11 Thread Bruce Momjian
Tom Lane wrote: > Florian Pflug writes: > > On Jul11, 2011, at 17:11 , Tom Lane wrote: > >> Yeah, I think this patch is going in the wrong direction altogether. > >> It would be better to modify the description of virtualtransaction > >> and pid to say that those are the "locking" entity. > > > H

Re: [HACKERS] Need help understanding pg_locks

2011-07-11 Thread Bruce Momjian
Tom Lane wrote: > Florian Pflug writes: > > On Jul11, 2011, at 05:47 , Bruce Momjian wrote: > >> Thank you. I think my confusion is that virtualtransaction is the lock > >> holder/waiter, and the other two are actual locks. The attached doc > >> patch clarifies that. I had actually realized thi

Re: [HACKERS] Need help understanding pg_locks

2011-07-11 Thread Tom Lane
Florian Pflug writes: > On Jul11, 2011, at 17:11 , Tom Lane wrote: >> Yeah, I think this patch is going in the wrong direction altogether. >> It would be better to modify the description of virtualtransaction >> and pid to say that those are the "locking" entity. > Hm, we already kinda of say tha

Re: [HACKERS] Need help understanding pg_locks

2011-07-11 Thread Florian Pflug
On Jul11, 2011, at 17:11 , Tom Lane wrote: > Florian Pflug writes: >> On Jul11, 2011, at 05:47 , Bruce Momjian wrote: >>> Thank you. I think my confusion is that virtualtransaction is the lock >>> holder/waiter, and the other two are actual locks. The attached doc >>> patch clarifies that. I ha

Re: [HACKERS] Need help understanding pg_locks

2011-07-11 Thread Tom Lane
Florian Pflug writes: > On Jul11, 2011, at 05:47 , Bruce Momjian wrote: >> Thank you. I think my confusion is that virtualtransaction is the lock >> holder/waiter, and the other two are actual locks. The attached doc >> patch clarifies that. I had actually realized this a few weeks ago and >> f

Re: [HACKERS] Need help understanding pg_locks

2011-07-11 Thread Florian Pflug
On Jul11, 2011, at 05:47 , Bruce Momjian wrote: > Thank you. I think my confusion is that virtualtransaction is the lock > holder/waiter, and the other two are actual locks. The attached doc > patch clarifies that. I had actually realized this a few weeks ago and > forgot, meaning this is pretty

Re: [HACKERS] Need help understanding pg_locks

2011-07-10 Thread Bruce Momjian
Florian Pflug wrote: > On Jul10, 2011, at 06:01 , Bruce Momjian wrote: > > Can someone help me understand pg_locks? There are three fields related > > to virtual and real xids: > > > > virtualtransaction | text | > > transactionid | xid | > > virtualxid | text | > > > >

Re: [HACKERS] Need help understanding pg_locks

2011-07-10 Thread Florian Pflug
On Jul10, 2011, at 06:01 , Bruce Momjian wrote: > Can someone help me understand pg_locks? There are three fields related > to virtual and real xids: > > virtualtransaction | text | > transactionid | xid | > virtualxid | text | > > Our docs say 'virtualtransaction' is:

[HACKERS] Need help understanding pg_locks

2011-07-09 Thread Bruce Momjian
Can someone help me understand pg_locks? There are three fields related to virtual and real xids: virtualtransaction | text | transactionid | xid | virtualxid | text | Our docs say 'virtualtransaction' is: Virtual ID of the transaction that is holding or awa