mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Revert "postgres_fdw: Inherit the local transaction's access/deferrable modes."
We concluded that commit e5a3c9d9b
is a feature rather than a fix; since
it was added after feature freeze, revert it.
Reported-by: Fujii Masao <masao.fujii@oss.nttdata.com>
Reported-by: Michael Paquier <michael@paquier.xyz>
Reported-by: Robert Haas <robertmhaas@gmail.com>
Discussion: https://postgr.es/m/ed2296f1-1a6b-4932-b870-5bb18c2591ae%40oss.nttdata.com
This commit is contained in:
@ -1044,34 +1044,6 @@ TransactionStartedDuringRecovery(void)
|
||||
return CurrentTransactionState->startedInRecovery;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user