Re: relation ### modified while in use - Mailing list pgsql-hackers

From Philip Warner
Subject Re: relation ### modified while in use
Date
Msg-id 3.0.5.32.20001024013913.032642b0@mail.rhyme.com.au
Whole thread Raw
In response to Re: relation ### modified while in use  (Hiroshi Inoue <Inoue@tpf.co.jp>)
Responses Re: relation ### modified while in use  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 15:29 23/10/00 +0900, Hiroshi Inoue wrote:
>
>If we have a mechanism to acquire a share lock on a tuple,we
>could use it for managing system info generally. However the
>only allowed lock on a tuple is exclusive.  Access(Share/Exclusive)
>Lock on tables would give us a restricted solution about pg_class
>tuples.
>

Don't we have this ability? What about taking a RowShare lock on the
pg_class tuple whenever you read from the table; then requiring schema
updates take a RowExclusive lock on the pg_class tuple?

As you say, it won't prevent deadlocks, but it seems like a reasonable
thing to do.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql/src/test/regress/expected (plpgsql.out inet.out foreign_key.out errors.out)
Next
From: Tom Lane
Date:
Subject: Re: AW: to_char() dumps core