From c9b75c5838feeae73dbae00bce9d8f650b80ba38 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Sat, 26 Jan 2019 10:45:23 +0900 Subject: 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 --- src/include/access/xact.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/include') 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 @@ -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 */ -- cgit v1.2.3