Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit4bf2dfb

Browse 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_locksview. Per suggestion from Florian.
1 parent295e639 commit4bf2dfb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines 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/0518:10:47 tgl Exp $
10+
*$PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.34 2007/09/0520: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)

[8]ページ先頭

©2009-2025 Movatter.jp