Object (Domain) locking - Mailing list pgsql-patches

From Rod Taylor
Subject Object (Domain) locking
Date
Msg-id 1045356646.12011.32.camel@jester
Whole thread Raw
Responses Re: Object (Domain) locking  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Object (Domain) locking  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Sorry, sending this wile packing to leave for a week... It should be ok.

- Modifies LOCKTAG to include a 'classId'. Relation receive a classId of
RelOid_pg_class, and transaction locks XactLockTableId. RelId is renamed
to objId.

- LockObject() and UnlockObject() functions created, and their use
sprinkled throughout the code to do descent locking for domains and
types. They accept lock modes AccessShare and AccessExclusive, as we
only really need a 'read' and 'write' lock at the moment.  Most locking
cases are held until the end of the transaction.

This fixes the cases Tom mentioned earlier in regards to locking with
Domains.  If the patch is good, I'll work on cleaning up issues with
other database objects that have this problem (most of them).

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachment

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cosmetic change in catalog/index.c
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: [HACKERS] psql and readline