@@ -450,13 +450,15 @@ begin_remote_xact(ConnCacheEntry *entry)
450
450
elog (DEBUG3 , "starting remote transaction on connection %p" ,
451
451
entry -> conn );
452
452
453
- if (UseTsDtmTransactions && TransactionIdIsValid (gxid ))
454
- {
455
- char stmt [64 ];
456
- snprintf (stmt , sizeof (stmt ), "select public.dtm_join_transaction(%d)" , gxid );
457
- res = PQexec (entry -> conn , stmt );
458
- PQclear (res );
459
- }
453
+ // XXXX?
454
+ //
455
+ // if (UseTsDtmTransactions && TransactionIdIsValid(gxid))
456
+ // {
457
+ // char stmt[64];
458
+ // snprintf(stmt, sizeof(stmt), "select public.dtm_join_transaction(%d)", gxid);
459
+ // res = PQexec(entry->conn, stmt);
460
+ // PQclear(res);
461
+ // }
460
462
461
463
if (IsolationIsSerializable ())
462
464
sql = "START TRANSACTION ISOLATION LEVEL SERIALIZABLE" ;
@@ -478,7 +480,7 @@ begin_remote_xact(ConnCacheEntry *entry)
478
480
if (!currentGlobalTransactionId )
479
481
{
480
482
char * resp ;
481
- res = PQexec (currentConnection , psprintf ("SELECT public.dtm_extend ('%d.%d')" ,
483
+ res = PQexec (currentConnection , psprintf ("SELECT public.pg_global_snaphot_create ('%d.%d')" ,
482
484
MyProcPid , ++ currentLocalTransactionId ));
483
485
484
486
if (PQresultStatus (res ) != PGRES_TUPLES_OK )
@@ -492,7 +494,7 @@ begin_remote_xact(ConnCacheEntry *entry)
492
494
}
493
495
PQclear (res );
494
496
}
495
- res = PQexec (entry -> conn , psprintf ("SELECT public.dtm_access (%llu, '%d.%d')" , currentGlobalTransactionId , MyProcPid , currentLocalTransactionId ));
497
+ res = PQexec (entry -> conn , psprintf ("SELECT public.pg_global_snaphot_join (%llu, '%d.%d')" , currentGlobalTransactionId , MyProcPid , currentLocalTransactionId ));
496
498
497
499
if (PQresultStatus (res ) != PGRES_TUPLES_OK )
498
500
{
@@ -817,11 +819,11 @@ pgfdw_xact_callback(XactEvent event, void *arg)
817
819
818
820
if (!RunDtmCommand (psprintf ("PREPARE TRANSACTION '%d.%d'" ,
819
821
MyProcPid , currentLocalTransactionId )) ||
820
- !RunDtmFunction (psprintf ("SELECT public.dtm_begin_prepare ('%d.%d')" ,
822
+ !RunDtmFunction (psprintf ("SELECT public.pg_global_snaphot_begin_prepare ('%d.%d')" ,
821
823
MyProcPid , currentLocalTransactionId )) ||
822
- !RunDtmStatement (psprintf ("SELECT public.dtm_prepare ('%d.%d',0)" ,
824
+ !RunDtmStatement (psprintf ("SELECT public.pg_global_snaphot_prepare ('%d.%d',0)" ,
823
825
MyProcPid , currentLocalTransactionId ), PGRES_TUPLES_OK , DtmMaxCSN , & maxCSN ) ||
824
- !RunDtmFunction (psprintf ("SELECT public.dtm_end_prepare ('%d.%d',%lld)" ,
826
+ !RunDtmFunction (psprintf ("SELECT public.pg_global_snaphot_end_prepare ('%d.%d',%lld)" ,
825
827
MyProcPid , currentLocalTransactionId , maxCSN )) ||
826
828
!RunDtmCommand (psprintf ("COMMIT PREPARED '%d.%d'" ,
827
829
MyProcPid , currentLocalTransactionId )))
0 commit comments