Object (Domain) locking

Lists: pgsql-patches
From: Rod Taylor <rbt(at)rbt(dot)ca>
To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Object (Domain) locking
Date: 2003-02-16 00:50:46
Message-ID: 1045356646.12011.32.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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(at)rbt(dot)ca>

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

Attachment Content-Type Size
dbdomainlock.patch text/plain 41.1 KB

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Object (Domain) locking
Date: 2003-02-18 05:16:38
Message-ID: 200302180516.h1I5Gci18220@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Rod Taylor wrote:
-- Start of PGP signed section.
> 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(at)rbt(dot)ca>
>
> PGP Key: http://www.rbt.ca/rbtpub.asc

[ Attachment, skipping... ]
-- End of PGP section, PGP failed!

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Object (Domain) locking
Date: 2003-02-19 04:02:49
Message-ID: 200302190402.h1J42ni02580@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Patch applied. Thanks.

---------------------------------------------------------------------------

Rod Taylor wrote:
-- Start of PGP signed section.
> 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(at)rbt(dot)ca>
>
> PGP Key: http://www.rbt.ca/rbtpub.asc

[ Attachment, skipping... ]
-- End of PGP section, PGP failed!

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073