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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/backend/access/common/relation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/access/common/relation.c') diff --git a/src/backend/access/common/relation.c b/src/backend/access/common/relation.c index beec34f126f..41a0051f88e 100644 --- a/src/backend/access/common/relation.c +++ b/src/backend/access/common/relation.c @@ -71,7 +71,7 @@ relation_open(Oid relationId, LOCKMODE lockmode) /* Make note that we've accessed a temporary relation */ if (RelationUsesLocalBuffers(r)) - MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPREL; + MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPNAMESPACE; pgstat_initstats(r); @@ -121,7 +121,7 @@ try_relation_open(Oid relationId, LOCKMODE lockmode) /* Make note that we've accessed a temporary relation */ if (RelationUsesLocalBuffers(r)) - MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPREL; + MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPNAMESPACE; pgstat_initstats(r); -- cgit v1.2.3