Avoid use of already-closed relcache entry.
Oversight in commit 17f8ffa1e. Per buildfarm member prion.
This commit is contained in:
parent
17f8ffa1e3
commit
e3044f6184
@ -326,8 +326,6 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString,
|
||||
if (!stmt->skipData)
|
||||
processed = refresh_matview_datafill(dest, dataQuery, queryString);
|
||||
|
||||
heap_close(matviewRel, NoLock);
|
||||
|
||||
/* Make the matview match the newly generated data. */
|
||||
if (concurrent)
|
||||
{
|
||||
@ -361,6 +359,8 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString,
|
||||
pgstat_count_heap_insert(matviewRel, processed);
|
||||
}
|
||||
|
||||
heap_close(matviewRel, NoLock);
|
||||
|
||||
/* Roll back any GUC changes */
|
||||
AtEOXact_GUC(false, save_nestlevel);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user