diff options
author | Michael Paquier | 2019-01-26 01:45:23 +0000 |
---|---|---|
committer | Michael Paquier | 2019-01-26 01:45:23 +0000 |
commit | c9b75c5838feeae73dbae00bce9d8f650b80ba38 (patch) | |
tree | 5e3b8ba1a207d1a602b2485b453890a8174e4dad /src/include | |
parent | df4c9044406f1e907268930dd12ba6c3642d21dd (diff) |
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
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/access/xact.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/include/access/xact.h b/src/include/access/xact.h index ed21a13896f..426e77846f9 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -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 @@ -99,12 +99,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 */ typedef enum |