1
0
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:
Etsuro Fujita
2025-06-08 17:30:00 +09:00
parent 73e26cbeb5
commit 7d4667c620
6 changed files with 8 additions and 347 deletions

View File

@ -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
*/

View File

@ -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);