@@ -450,13 +450,15 @@ begin_remote_xact(ConnCacheEntry *entry)
450450 elog (DEBUG3 , "starting remote transaction on connection %p" ,
451451 entry -> conn );
452452
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+ // }
460462
461463 if (IsolationIsSerializable ())
462464 sql = "START TRANSACTION ISOLATION LEVEL SERIALIZABLE" ;
@@ -478,7 +480,7 @@ begin_remote_xact(ConnCacheEntry *entry)
478480 if (!currentGlobalTransactionId )
479481 {
480482 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')" ,
482484 MyProcPid , ++ currentLocalTransactionId ));
483485
484486 if (PQresultStatus (res ) != PGRES_TUPLES_OK )
@@ -492,7 +494,7 @@ begin_remote_xact(ConnCacheEntry *entry)
492494 }
493495 PQclear (res );
494496 }
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 ));
496498
497499 if (PQresultStatus (res ) != PGRES_TUPLES_OK )
498500 {
@@ -817,11 +819,11 @@ pgfdw_xact_callback(XactEvent event, void *arg)
817819
818820 if (!RunDtmCommand (psprintf ("PREPARE TRANSACTION '%d.%d'" ,
819821 MyProcPid , currentLocalTransactionId )) ||
820- !RunDtmFunction (psprintf ("SELECT public.dtm_begin_prepare ('%d.%d')" ,
822+ !RunDtmFunction (psprintf ("SELECT public.pg_global_snaphot_begin_prepare ('%d.%d')" ,
821823 MyProcPid , currentLocalTransactionId )) ||
822- !RunDtmStatement (psprintf ("SELECT public.dtm_prepare ('%d.%d',0)" ,
824+ !RunDtmStatement (psprintf ("SELECT public.pg_global_snaphot_prepare ('%d.%d',0)" ,
823825 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)" ,
825827 MyProcPid , currentLocalTransactionId , maxCSN )) ||
826828 !RunDtmCommand (psprintf ("COMMIT PREPARED '%d.%d'" ,
827829 MyProcPid , currentLocalTransactionId )))
0 commit comments