Re: Summary and Plan for Hot Standby
От | Tatsuo Ishii |
---|---|
Тема | Re: Summary and Plan for Hot Standby |
Дата | |
Msg-id | 20091117.092540.74752205.t-ishii@sraoss.co.jp обсуждение исходный текст |
Ответ на | Re: Summary and Plan for Hot Standby (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: Summary and Plan for Hot Standby
|
Список | pgsql-hackers |
> > Please correct me if I'm wrong. Parse will result in obtaining > > RowExclusiveLock on the target table if it is parsing > > INSERT/UPDATE/DELETE. If so, is this ok in the standby? > > Any attempt to take RowExclusiveLock will fail. > > Any attempt to execute INSERT/UPDATE/DELETE will fail. > > This behaviour should be identical to read only transaction mode. If it > is not documented as an exception, please report as a bug. Is it? It seems read only transaction mode is perfectly happy with RowExclusiveLock: test=# begin; BEGIN test=# set transaction read only; SET test=# prepare a(int) as insert into t1 values($1); PREPARE test=# \x Expanded display is on. test=# select * from pg_locks; -[ RECORD 1 ]------+----------------- locktype | relation database | 1297143 relation | 10969 page | tuple | virtualxid | transactionid | classid | objid | objsubid | virtualtransaction | 1/101699 pid | 28020 mode | AccessShareLock granted | t -[ RECORD 2 ]------+----------------- locktype | virtualxid database | relation | page | tuple | virtualxid | 1/101699 transactionid | classid | objid | objsubid | virtualtransaction | 1/101699 pid | 28020 mode | ExclusiveLock granted | t -[ RECORD 3 ]------+----------------- locktype | relation database | 1297143 relation | 1574918 page | tuple | virtualxid | transactionid | classid | objid | objsubid | virtualtransaction | 1/101699 pid | 28020 mode | RowExclusiveLock granted | t test=# select relname from pg_class where oid = 1574918; -[ RECORD 1 ] relname | t1 -- Tatsuo Ishii SRA OSS, Inc. Japan
В списке pgsql-hackers по дате отправления: