mirror of
https://github.com/postgres/postgres.git
synced 2025-09-05 02:22:28 +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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user