lock.h and proc.h
hi..i have questions about struct pgproc (in file proc.h) and proclock ( in
file lock.h) of the postgresql source code, does anyone know the exact
difference between pgproc and proclock structs??
thank you
-sumaira
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
"Sumaira Ali" <nat_lazy@hotmail.com> writes:
hi..i have questions about struct pgproc (in file proc.h) and proclock ( in
file lock.h) of the postgresql source code, does anyone know the exact
difference between pgproc and proclock structs??
There's one PGPROC per process. There's one PROCLOCK for each process
and each lock that that process has any interest in (ie, either
currently holds or is waiting for).
The comments for these structs seem to be a bit of a mess at the moment :-(
Bruce renamed the struct types recently, but appears not to have done a
good job of adjusting the comments to match. It may help to know that
a proclock object was formerly called a "holder".
regards, tom lane
Attached is a patch I just applied to clean this up. I didn't realize
how bad it was.
The reason for the name changes is that PROCLOCK is used by lock holders
and lock waiters.
---------------------------------------------------------------------------
Tom Lane wrote:
"Sumaira Ali" <nat_lazy@hotmail.com> writes:
hi..i have questions about struct pgproc (in file proc.h) and proclock ( in
file lock.h) of the postgresql source code, does anyone know the exact
difference between pgproc and proclock structs??There's one PGPROC per process. There's one PROCLOCK for each process
and each lock that that process has any interest in (ie, either
currently holds or is waiting for).The comments for these structs seem to be a bit of a mess at the moment :-(
Bruce renamed the struct types recently, but appears not to have done a
good job of adjusting the comments to match. It may help to know that
a proclock object was formerly called a "holder".regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073