tablelevel and rowlevel locks

From: "Jenny -" <nat_lazy(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: tablelevel and rowlevel locks
Date: 2003-09-04 15:56:31
Message-ID: BAY1-F108MwLq5BkwUz000243dd@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

I am working on a project that involves displaying locking information about
each lock taken, whether it be a row level or table leve llock.
When dealing with struct LOCK (src/include/storage) i have noticed that
postgreSQL creates a single LOCK struct for each table in the db. Like if
i acquire 2 seperate row level locks on 2 seperate rows, both these locks
are represented in the same struct LOCK datastructure . And if i acquire a
table level lock on this table, then all 3 locks information( 2 row level
locks and 1 table level lock) is recorded in the same LOCK datastructure. I
would think that there should be 3 different LOCK datastructres created in
postgreSQL for the above example.
IS there are reason why only one LOCK datastructures is created in such a
case?
for the purposes of my project i need to seperate out these 3 locks and
present them as 3 distinct locked objects. i was using the LockData(defined
in src/include/storage/lock.h ) datastructures for this, but if all 3 locks
are put into the same LOCK struct even in LOCKDATA then can someone help me
as to how else i can accomplish what i intent on doing?
thank you very much
Jenny

_________________________________________________________________
Compare Cable, DSL or Satellite plans: As low as $29.95.
https://broadband.msn.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-09-04 16:00:09 Re: NFS performance tuning
Previous Message Greg Stark 2003-09-04 15:48:21 Re: Replaceing records

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2003-09-04 15:57:04 FK type mismatches?
Previous Message Czuczy Gergely 2003-09-04 15:55:48 Re: Seqscan in MAX(index_column)