Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4bf2dfb

Browse filesBrowse files
committed
Quick hack to make the VXID of a prepared transaction be -1/XID,
so that different prepared xacts can be told apart in the pg_locks view. Per suggestion from Florian.
1 parent 295e639 commit 4bf2dfb
Copy full SHA for 4bf2dfb

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎src/backend/access/transam/twophase.c

Copy file name to clipboardExpand all lines: src/backend/access/transam/twophase.c
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.33 2007/09/05 18:10:47 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.34 2007/09/05 20:53:17 tgl Exp $
1111
*
1212
* NOTES
1313
* Each global transaction is associated with a global transaction
@@ -274,7 +274,8 @@ MarkAsPreparing(TransactionId xid, const char *gid,
274274
MemSet(&gxact->proc, 0, sizeof(PGPROC));
275275
SHMQueueElemInit(&(gxact->proc.links));
276276
gxact->proc.waitStatus = STATUS_OK;
277-
gxact->proc.lxid = InvalidLocalTransactionId;
277+
/* We set up the gxact's VXID as InvalidBackendId/XID */
278+
gxact->proc.lxid = (LocalTransactionId) xid;
278279
gxact->proc.xid = xid;
279280
gxact->proc.xmin = InvalidTransactionId;
280281
gxact->proc.pid = 0;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.