Manfred Koizar wrote: > On Fri, 29 Nov 2002 13:33:28 -0500, Tom Lane <[EMAIL PROTECTED]> > wrote: > >Unfortunately this discussion is wrong. User-level visibility checks > >will usually have to fetch the parentxid in case 01 as well, because > >even if the parent is committed, it might not be visible in our > >snapshot. > > Or we don't allow a subtransaction's status to be updated from 11 to > 01 until we know, that the main transaction is visible to all active > transactions. Didn't check whether this is expensive to find out. At > least it should be doable by VACCUM. > > >Snapshots will record only topmost-parent XIDs (because > >that's what we can find in the PG_PROC array, and anything else would > >create atomicity problems anyway). So we must chase to the topmost > >parent before testing visibility. > > BTW, I think this *forces* us to replace the sub xid with the > respective main xid in a tuple header, when we set > XMIN/MAX_IS_COMMITTED. Otherwise we'd have to look for the main xid, > whenever a tuple is touched.
Sorry, I don't follow this. As far as I know, we will set the subxid on the tuple so we can independently mark the xact as aborted without revisiting all the tuples. Once it is committed/rolled back, I see no need to lookup the parent, and in fact we could clear the clog parent xid offset so there is no way to access the parent anymore. -- Bruce Momjian | http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org