Re: relation ### modified while in use
От | Hiroshi Inoue |
---|---|
Тема | Re: relation ### modified while in use |
Дата | |
Msg-id | 39F4D1D9.D449E871@tpf.co.jp обсуждение исходный текст |
Ответ на | Re: relation ### modified while in use (Alex Pilosov <alex@pilosoft.com>) |
Список | pgsql-hackers |
Philip Warner wrote: > 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? > Both RowShare and RowExclusive lock are table level locking. The implementation of tuple level locking is quite different from that of table level locking. The information of table level locking is held in shared memory. OTOH the information of tuple level locking is held in the tuple itself i.e. a transaction(t_xmax) is updating/deleting/selecting for update the tuple.... If other backends are about to update/delete/select for update a tuple,they check the information of the tuple and if the tuple is being updated/... they wait until the end of the transaction(t_xmax). Regards. Hiroshi Inoue
В списке pgsql-hackers по дате отправления: