diff options
| -rw-r--r-- | src/gtm/main/gtm_txn.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gtm/main/gtm_txn.c b/src/gtm/main/gtm_txn.c index 44148e06a4..d45a9e2448 100644 --- a/src/gtm/main/gtm_txn.c +++ b/src/gtm/main/gtm_txn.c @@ -505,6 +505,12 @@ GTM_GetGlobalTransactionIdMulti(GTM_TransactionHandle handle[], int txn_count) GTM_TransactionInfo *gtm_txninfo = NULL; int ii; + if (Recovery_IsStandby()) + { + ereport(ERROR, (EINVAL, errmsg("GTM is running in STANDBY mode -- can not issue new transaction ids"))); + return InvalidGlobalTransactionId; + } + GTM_RWLockAcquire(>MTransactions.gt_XidGenLock, GTM_LOCKMODE_WRITE); if (GTMTransactions.gt_gtm_state == GTM_SHUTTING_DOWN) |
