diff options
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/transam/xact.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 2e67e998adb..b885513f765 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -1045,34 +1045,6 @@ TransactionStartedDuringRecovery(void) } /* - * GetTopReadOnlyTransactionNestLevel - * - * Note: this will return zero when not inside any transaction or when neither - * a top-level transaction nor subtransactions are read-only, one when the - * top-level transaction is read-only, two when one level of subtransaction is - * read-only, etc. - * - * Note: subtransactions of the topmost read-only transaction are also - * read-only, because they inherit read-only mode from the transaction, and - * thus can't change to read-write mode. See check_transaction_read_only(). - */ -int -GetTopReadOnlyTransactionNestLevel(void) -{ - TransactionState s = CurrentTransactionState; - - if (!XactReadOnly) - return 0; - while (s->nestingLevel > 1) - { - if (!s->prevXactReadOnly) - return s->nestingLevel; - s = s->parent; - } - return s->nestingLevel; -} - -/* * EnterParallelMode */ void |