mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Keep heap open until new heap generated in RMV.
Early close became apparent when invalidation messages were processed in a new location under CLOBBER_CACHE_ALWAYS builds, due to additional locking. Back-patch to 9.3
This commit is contained in:
parent
0ea53256a8
commit
5829082a57
@ -239,8 +239,6 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString,
|
|||||||
|
|
||||||
owner = matviewRel->rd_rel->relowner;
|
owner = matviewRel->rd_rel->relowner;
|
||||||
|
|
||||||
heap_close(matviewRel, NoLock);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create the transient table that will receive the regenerated data.
|
* Create the transient table that will receive the regenerated data.
|
||||||
* Lock it against access by any other process until commit (by which time
|
* Lock it against access by any other process until commit (by which time
|
||||||
@ -255,6 +253,8 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString,
|
|||||||
if (!stmt->skipData)
|
if (!stmt->skipData)
|
||||||
refresh_matview_datafill(dest, dataQuery, queryString, owner);
|
refresh_matview_datafill(dest, dataQuery, queryString, owner);
|
||||||
|
|
||||||
|
heap_close(matviewRel, NoLock);
|
||||||
|
|
||||||
/* Make the matview match the newly generated data. */
|
/* Make the matview match the newly generated data. */
|
||||||
if (concurrent)
|
if (concurrent)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user