
>"S -" writes: 
> > We are working on a project where we want to create a single linked list 
> > that holds information of all the locks taken or being waited for by 
> > transactions in Postgresql. 
> 
>How will you maintain such a list, when the underlying state is 

>constantly being changed by many different processes? 
What do you mean by underlying state? And also, each each time any process (transaction)wants to acqure a lock it calls LockAcquire (and if we put our code to update our linkedlist)and won't that ways each processes's actions be recorded in the linkedlist.
thanks
-sumaira

The new MSN 8: smart spam protection and 2 months FREE* 

Thu, 24 Apr 2003 21:17:53 -0700
"Sumaira Ali -" <nat_lazy@hotmail.com>
Re: Putting code in main of src/backend/main/main.c
"Sumaira Ali -" <nat_lazy@hotmail.com> writes:
> <P>What do you mean by underlying state? And also, each each time any process (transaction)wants to acqure a lock it calls LockAcquire (and if we put our code to update our linkedlist)and won't that ways each processes's actions be recorded in the linkedlist.</P>

Not unless you keep the linked list in shared memory --- at which point
it is surely duplicative of the lists the lock manager already maintains.

			regards, tom lane


Fri, 25 Apr 2003 00:28:19 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Putting code in main of src/backend/main/main.c 