diff options
author | Kevin Grittner <kgrittn@postgresql.org> | 2013-11-06 12:27:52 -0600 |
---|---|---|
committer | Kevin Grittner <kgrittn@postgresql.org> | 2013-11-06 12:27:52 -0600 |
commit | 5829082a57be8bcbc5f75cd28d935730b783c6d2 (patch) | |
tree | 2a28154e7ee22bcbc231ed607b7613619df02c8e /src/backend/commands/matview.c | |
parent | 0ea53256a856693dc8e8e1ce5ce26b3438d2e341 (diff) | |
download | postgresql-5829082a57be8bcbc5f75cd28d935730b783c6d2.tar.gz postgresql-5829082a57be8bcbc5f75cd28d935730b783c6d2.zip |
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
Diffstat (limited to 'src/backend/commands/matview.c')
-rw-r--r-- | src/backend/commands/matview.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c index e3b0cbb708e..4a7805057e7 100644 --- a/src/backend/commands/matview.c +++ b/src/backend/commands/matview.c @@ -239,8 +239,6 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, owner = matviewRel->rd_rel->relowner; - heap_close(matviewRel, NoLock); - /* * Create the transient table that will receive the regenerated data. * 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) refresh_matview_datafill(dest, dataQuery, queryString, owner); + heap_close(matviewRel, NoLock); + /* Make the matview match the newly generated data. */ if (concurrent) { |