Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit af463bd

Browse files
committed
Revisit gid format again to fix shardman's deadlock detector.
1 parent f110b4e commit af463bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/postgres_fdw/connection.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -818,13 +818,13 @@ pgfdw_xact_callback(XactEvent event, void *arg)
818818
bool res;
819819
char *sql;
820820

821-
fdwTransState->gid = psprintf("fdw:%lld:%llx:%u:%d:%d:%d",
821+
fdwTransState->gid = psprintf("pgfdw:%lld:%llu:%d:%u:%d:%d",
822822
(long long) GetCurrentTimestamp(),
823823
(long long) GetSystemIdentifier(),
824-
GetCurrentTransactionIdIfAny(),
825-
fdwTransState->nparticipants,
826824
MyProcPid,
827-
++two_phase_xact_count);
825+
GetCurrentTransactionIdIfAny(),
826+
++two_phase_xact_count,
827+
fdwTransState->nparticipants);
828828

829829
/* Broadcast PREPARE */
830830
sql = psprintf("PREPARE TRANSACTION '%s'", fdwTransState->gid);

0 commit comments

Comments
 (0)