RE: [HACKERS] Open 6.5 items

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Vadim Mikheev" <vadim(at)krs(dot)ru>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <t-ishii(at)sra(dot)co(dot)jp>, "PostgreSQL-development" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] Open 6.5 items
Date: 1999-06-04 08:21:13
Message-ID: 000101beae63$35be1e80$2801007e@cadzone.tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: root(at)sunpine(dot)krs(dot)ru [mailto:root(at)sunpine(dot)krs(dot)ru]On Behalf Of Vadim
> Mikheev
> Sent: Thursday, June 03, 1999 10:45 PM
> To: Hiroshi Inoue
> Cc: Tom Lane; t-ishii(at)sra(dot)co(dot)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(at)tpf(dot)co(dot)jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 1999-06-04 08:22:00 RE: [HACKERS] Open 6.5 items
Previous Message Vadim Mikheev 1999-06-04 06:33:46 Re: [HACKERS] Open 6.5 items