Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xact.c28
-rw-r--r--src/include/access/xact.h1
2 files changed, 0 insertions, 29 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
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index 7f11b919799..b2bc10ee041 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -458,7 +458,6 @@ extern TimestampTz GetCurrentTransactionStopTimestamp(void);
extern void SetCurrentStatementStartTimestamp(void);
extern int GetCurrentTransactionNestLevel(void);
extern bool TransactionIdIsCurrentTransactionId(TransactionId xid);
-extern int GetTopReadOnlyTransactionNestLevel(void);
extern void CommandCounterIncrement(void);
extern void ForceSyncCommit(void);
extern void StartTransactionCommand(void);