RE: [HACKERS] Open 6.5 items
От | Hiroshi Inoue |
---|---|
Тема | RE: [HACKERS] Open 6.5 items |
Дата | |
Msg-id | 000101beae63$35be1e80$2801007e@cadzone.tpf.co.jp обсуждение исходный текст |
Ответ на | Re: [HACKERS] Open 6.5 items (Vadim Mikheev <vadim@krs.ru>) |
Список | pgsql-hackers |
> -----Original Message----- > From: root@sunpine.krs.ru [mailto:root@sunpine.krs.ru]On Behalf Of Vadim > Mikheev > Sent: Thursday, June 03, 1999 10:45 PM > To: Hiroshi Inoue > Cc: Tom Lane; t-ishii@sra.co.jp; PostgreSQL-development > Subject: Re: [HACKERS] Open 6.5 items > > > Hiroshi Inoue wrote: > > > > However,when I did vacuum while testing I got the following error > > message. > > ERROR: Child itemid marked as unused > > > > TransactionId-s of tuples in update chain may be out of order. > > 1. Fix and explanation in xact.c:CommitTransaction(): > > RecordTransactionCommit(); > > /* > * Let others know about no transaction in progress by me. > * Note that this must be done _before_ releasing locks we hold > * and SpinAcquire(ShmemIndexLock) is required - or bad (too high) > * XmaxRecent value might be used by vacuum: UPDATE with xid 0 is > * blocked by xid 1' UPDATE, xid 1 is doing commit while xid 2 > * gets snapshot - if xid 2' GetSnapshotData sees xid 1 as running > * then it must see xid 0 as running as well or XmaxRecent = 1 > * might be used by concurrent vacuum causing > * ERROR: Child itemid marked as unused > * This bug was reported by Hiroshi Inoue and I was able to reproduce > * it with 3 sessions and gdb. - vadim 06/03/99 > */ > if (MyProc != (PROC *) NULL) > { > SpinAcquire(ShmemIndexLock); > MyProc->xid = InvalidTransactionId; > MyProc->xmin = InvalidTransactionId; > SpinRelease(ShmemIndexLock); > } > > 2. It was possible to get two versions of the same row from > select. Fixed by moving MyProc->xid assignment from > StartTransaction() inside GetNewTransactionId(). > > Thanks, Hiroshi! And please run your tests - I used just > 3 sessions and gdb. > Unfortunately,the error still occurs(I changed xact.c as above by hand OK ?). It seems there are cases that tuples are updated by older transactions than their xmin-s and only some tuples in the middle of update chain may be deleted. I have no idea to fix this now. It's OK for me to leave this unsolved because those cases would rarely occur. Thanks. Hiroshi Inoue Inoue@tpf.co.jp
В списке pgsql-hackers по дате отправления: