>"Himanshu Baweja" <[hidden email]> writes
>I wanted to see which tables/transaction have acquired or are waiting for
>as far as i know there are two ways to do it....
>1) pg_locks ::: need to write trigger... and have high overhead...
"select * from pg_locks" has trivial impact on the server. pg_locks is a
hacking the backend... can u elaborate a little bit
more... i want to write a small utility which other
ppl can use to see when the locks are acquired etc
etc... so that they can optimise their application
using that information... in my application we have
have 4 processes doing almost the same thing ie they
do the same quey at exactly the same time... and if i
can the complete lock information... i can change the
application so that they dont have to wait for each
> Himanshu Baweja wrote:
> > is there any other better way by which i can get a
> list of locks
> > acquired and waited for during entire run of my
> Hacking the backend would be the easiest route, I
> think. Why do you need
> this information -- what are you trying to do?
> >> 1) pg_locks ::: need to write trigger... and have
> > What do you mean by "write trigger"?
> I'm sure he's imagining that he can create a trigger
on pg_locks and
> thereby capture lock-related events :-(
well that was wht i was thinking.... got it now... i
will recompile with LOCK_DEBUG
> regards, tom lane
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?