Content-Length: 275751 | pFad | http://github.com/postgrespro/postgres_cluster/commit/b7520b7e67c654e1222b756a547a57e527096f01

5C respect new changing_xact_state variable · postgrespro/postgres_cluster@b7520b7 · GitHub
Skip to content

Commit b7520b7

Browse files
committed
respect new changing_xact_state variable
1 parent 7607a30 commit b7520b7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contrib/postgres_fdw/connection.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ begin_remote_xact(ConnCacheEntry *entry)
450450
elog(DEBUG3, "starting remote transaction on connection %p",
451451
entry->conn);
452452

453-
if (TransactionIdIsValid(gxid))
453+
if (UseTsDtmTransactions && TransactionIdIsValid(gxid))
454454
{
455455
char stmt[64];
456456
snprintf(stmt, sizeof(stmt), "select public.dtm_join_transaction(%d)", gxid);
@@ -873,7 +873,9 @@ pgfdw_xact_callback(XactEvent event, void *arg)
873873
pgfdw_reject_incomplete_xact_state_change(entry);
874874

875875
/* Commit all remote transactions during pre-commit */
876-
do_sql_send_command(entry->conn, "COMMIT TRANSACTION");
876+
entry->changing_xact_state = true;
877+
do_sql_command(entry->conn, "COMMIT TRANSACTION");
878+
entry->changing_xact_state = false;
877879
continue;
878880

879881
case XACT_EVENT_PRE_PREPARE:

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/b7520b7e67c654e1222b756a547a57e527096f01

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy