projects
/
users
/
simon
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
586f856
)
Quick hack to make the VXID of a prepared transaction be -1/XID,
author
Tom Lane
<tgl@sss.pgh.pa.us>
Wed, 5 Sep 2007 20:53:17 +0000
(20:53 +0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Wed, 5 Sep 2007 20:53:17 +0000
(20:53 +0000)
so that different prepared xacts can be told apart in the pg_locks
view. Per suggestion from Florian.
src/backend/access/transam/twophase.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/access/transam/twophase.c
b/src/backend/access/transam/twophase.c
index 7196cee79a0c259d10f6bcd67f04391776e9c3e5..2826bf69f2fd246aa7f383c7992b8d93ed55dc7f 100644
(file)
--- a/
src/backend/access/transam/twophase.c
+++ b/
src/backend/access/transam/twophase.c
@@
-274,7
+274,8
@@
MarkAsPreparing(TransactionId xid, const char *gid,
MemSet(&gxact->proc, 0, sizeof(PGPROC));
SHMQueueElemInit(&(gxact->proc.links));
gxact->proc.waitStatus = STATUS_OK;
- gxact->proc.lxid = InvalidLocalTransactionId;
+ /* We set up the gxact's VXID as InvalidBackendId/XID */
+ gxact->proc.lxid = (LocalTransactionId) xid;
gxact->proc.xid = xid;
gxact->proc.xmin = InvalidTransactionId;
gxact->proc.pid = 0;