HI,
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. Since main in src/backend/main/main.c will be 
run just once when the Postgresql starts up, can declaration and 
initialization of this single linked list be put in this main?
Thank you
Sumaira

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


Thu, 24 Apr 2003 00:34:03 -0700
"S -" <nat_lazy@hotmail.com>
Putting code in main of src/backend/main/main.c
"S -" <nat_lazy@hotmail.com> 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?

Perhaps more to the point, why would you want to?  The existing lock
status data structures in shared memory can be traversed at need.

			regards, tom lane


Thu, 24 Apr 2003 09:02:42 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Putting code in main of src/backend/main/main.c 