Re: problems with table corruption continued
От | Hiroshi Inoue |
---|---|
Тема | Re: problems with table corruption continued |
Дата | |
Msg-id | 3C1FDD2A.EC4A8B51@tpf.co.jp обсуждение исходный текст |
Ответ на | Re: problems with table corruption continued ("Hiroshi Inoue" <Inoue@tpf.co.jp>) |
Ответы |
Re: problems with table corruption continued
|
Список | pgsql-hackers |
Tom Lane wrote: > > "Hiroshi Inoue" <Inoue@tpf.co.jp> writes: > > Should the change be TransactionIdIsInProgress(tuple->t_cmin) ? > > I'd be willing to do > if (tuple->t_cmin is my XID) > do something; > Assert(!TransactionIdIsInProgress(tuple->t_cmin)); > if that makes you feel better. It's useless in hard to reproduce cases. I've thought but given up many times to propose this change and my decision seems to have been right because I see only *Assert* even after this issue. > But anything that's scanning > a table exclusive-locked by another transaction is broken. > (BTW: contrib/pgstattuple is thus broken. Will fix.) It seems dangerous to me to rely only on developers' carefulness. There are some places where relations are opened with NoLock. We had better change them. I once examined them but AFAIR there are few cases when they are really opened with NoLock. In most cases they are already opened previously with other lock modes. I don't remember well if there was a really dangerous(scan an relation opened with NoLock) place. regards, Hiroshi Inoue
В списке pgsql-hackers по дате отправления: