mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Avoid use of already-closed relcache entry.
Oversight in commit 17f8ffa1e
. Per buildfarm member prion.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user