mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Simplify restriction handling of two-phase commit for temporary objects
There were two flags used to track the access to temporary tables and to the temporary namespace of a session which are used to restrict PREPARE TRANSACTION, however the first control flag is a concept included in the second. This removes the flag for temporary table tracking, keeping around only the one at namespace level. Author: Michael Paquier Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/20190118053126.GH1883@paquier.xyz
This commit is contained in:
@ -87,10 +87,10 @@ extern int synchronous_commit;
|
||||
extern int MyXactFlags;
|
||||
|
||||
/*
|
||||
* XACT_FLAGS_ACCESSEDTEMPREL - set when a temporary relation is accessed. We
|
||||
* don't allow PREPARE TRANSACTION in that case.
|
||||
* XACT_FLAGS_ACCESSEDTEMPNAMESPACE - set when a temporary object is accessed.
|
||||
* We don't allow PREPARE TRANSACTION in that case.
|
||||
*/
|
||||
#define XACT_FLAGS_ACCESSEDTEMPREL (1U << 0)
|
||||
#define XACT_FLAGS_ACCESSEDTEMPNAMESPACE (1U << 0)
|
||||
|
||||
/*
|
||||
* XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK - records whether the top level xact
|
||||
@ -98,12 +98,6 @@ extern int MyXactFlags;
|
||||
*/
|
||||
#define XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK (1U << 1)
|
||||
|
||||
/*
|
||||
* XACT_FLAGS_ACCESSEDTEMPNAMESPACE - set when a temporary namespace is
|
||||
* accessed. We don't allow PREPARE TRANSACTION in that case.
|
||||
*/
|
||||
#define XACT_FLAGS_ACCESSEDTEMPNAMESPACE (1U << 2)
|
||||
|
||||
/*
|
||||
* start- and end-of-transaction callbacks for dynamically loaded modules
|
||||
*/
|
||||
|
Reference in New Issue
Block a user