aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/lockcmds.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-01-26 10:45:23 +0900
committerMichael Paquier <michael@paquier.xyz>2019-01-26 10:45:23 +0900
commitc9b75c5838feeae73dbae00bce9d8f650b80ba38 (patch)
tree5e3b8ba1a207d1a602b2485b453890a8174e4dad /src/backend/commands/lockcmds.c
parentdf4c9044406f1e907268930dd12ba6c3642d21dd (diff)
downloadpostgresql-c9b75c5838feeae73dbae00bce9d8f650b80ba38.tar.gz
postgresql-c9b75c5838feeae73dbae00bce9d8f650b80ba38.zip
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/backend/commands/lockcmds.c')
-rw-r--r--src/backend/commands/lockcmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c
index f4da564e012..43bba717f22 100644
--- a/src/backend/commands/lockcmds.c
+++ b/src/backend/commands/lockcmds.c
@@ -108,7 +108,7 @@ RangeVarCallbackForLockTable(const RangeVar *rv, Oid relid, Oid oldrelid,
*/
relpersistence = get_rel_persistence(relid);
if (relpersistence == RELPERSISTENCE_TEMP)
- MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPREL;
+ MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPNAMESPACE;
/* Check permissions. */
aclresult = LockTableAclCheck(relid, lockmode, GetUserId());