XIDTAG ??? - Mailing list pgsql-hackers

From Vadim Mikheev
Subject XIDTAG ???
Date
Msg-id 372DCC38.C1B28E20@krs.ru
Whole thread Raw
Responses Re: [HACKERS] XIDTAG ???  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Why both
   int           pid;   TransactionId xid;

are used in XIDTAG?

lock.c:*                                      normal lock     user lock**      lockmethod                      1
      2*      tag.relId                       rel oid         0
^^^^^^^^^^^^^^^^^
Due to this, user-lock LOCKTAG is always different from
normal-lock tag and so XIDTAG.lock is different also.
*      tag.ItemPointerData.ip_blkid    block id        lock id2*      tag.ItemPointerData.ip_posid    tuple offset
lockid1*      xid.pid                         0               backend pid*      xid.xid                         xid or
0       0
 

Why not get rid of XIDTAG.xid and use XIDTAG.pid equal
to backend pid for both lock methods?

Comments?

Vadim


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Jsut a test of mail relaying ...
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] XIDTAG ???