Re: CSStorm occurred again by postgreSQL8.2 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: CSStorm occurred again by postgreSQL8.2
Date
Msg-id 19738.1154956177@sss.pgh.pa.us
Whole thread Raw
In response to Re: CSStorm occurred again by postgreSQL8.2  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: CSStorm occurred again by postgreSQL8.2
List pgsql-hackers
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> The invokers of SubTrans module are two SubTransGetTopmostTransaction()
> in HeapTupleSatisfiesSnapshot(). When I disabled the calls, CSStorm did
> not occur. SubTransGetTopmostTransaction returns the argument without
> change when we don't use SAVEPOINTs.

> If we optimize for non-subtransactions, we can avoid to lock SubTrans
> for check visiblities of tuples inserted by top transactions.

Only for top transactions still in progress, so I doubt that would
help much.

I'm wondering about doing something similar to what
TransactionIdIsInProgress does, ie, make use of the PGPROC lists
of live subtransactions.  Suppose that GetSnapshotData copies not
only top xids but live subxids into the snapshot, and adds a flag
indicating whether the subxids are complete (ie, none of the subxid
lists have overflowed).  Then if the flag is set, tqual.c doesn't
need to do SubTransGetTopmostTransaction() before searching the
list.
        regards, tom lane


pgsql-hackers by date:

Previous
From: andrew@dunslane.net
Date:
Subject: Re: proposal for 8.3: Simultaneous assignment for
Next
From: stark
Date:
Subject: Re: "Constraint exclusion" is not general enough