aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/lockcmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c
index 1dbb35f6315..b247c0fe2e1 100644
--- a/src/backend/commands/lockcmds.c
+++ b/src/backend/commands/lockcmds.c
@@ -263,7 +263,6 @@ LockViewRecurse(Oid reloid, Oid root_reloid, LOCKMODE lockmode, bool nowait)
view = heap_open(reloid, NoLock);
viewquery = get_view_query(view);
- heap_close(view, NoLock);
context.root_reloid = root_reloid;
context.lockmode = lockmode;
@@ -272,6 +271,8 @@ LockViewRecurse(Oid reloid, Oid root_reloid, LOCKMODE lockmode, bool nowait)
context.viewoid = reloid;
LockViewRecurse_walker((Node *) viewquery, &context);
+
+ heap_close(view, NoLock);
}
/*