Re: a few questions (and doubts) about xid - Mailing list pgsql-general

From Luca Ferrari
Subject Re: a few questions (and doubts) about xid
Date
Msg-id 200707270920.57235.fluca1978@infinito.it
Whole thread Raw
In response to Re: a few questions (and doubts) about xid  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: a few questions (and doubts) about xid
List pgsql-general
Thanks all for your comments. Just another little hint here (sorry for trivial
questions):

    if (TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetXmax(tuple)))
    {
        if (tuple->t_infomask & HEAP_IS_LOCKED)
            return true;
        if (HeapTupleHeaderGetCmax(tuple) >= GetCurrentCommandId())
            return true;        /* deleted after scan started */
        else
            return false;        /* deleted before scan started */
    }

what does that "deleted after scan started" means? How is possible that the
current transaction has deleted the tuple with a command higher than the one
that is still executing? An example could clearify....

Thanks,
Luca

pgsql-general by date:

Previous
From: "Stuart"
Date:
Subject: generating part of composite key
Next
From: "Albe Laurenz"
Date:
Subject: Re: NOTICE Acepted as Error After Upgrade