On 2013-07-17 10:11:28 -0400, Tom Lane wrote: > Kevin Grittner <kgri...@postgresql.org> writes: > > Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY. > > The buildfarm members that use -DCLOBBER_CACHE_ALWAYS say this patch > is broken.
Jagarundi still tells that story. At least something like the following patch seems to be required. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c index 46149ee..09ea344 100644 --- a/src/backend/commands/matview.c +++ b/src/backend/commands/matview.c @@ -141,6 +141,7 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, List *actions; Query *dataQuery; Oid tableSpace; + Oid owner; Oid OIDNewHeap; DestReceiver *dest; bool concurrent; @@ -238,6 +239,8 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, else tableSpace = matviewRel->rd_rel->reltablespace; + owner = matviewRel->rd_rel->relowner; + heap_close(matviewRel, NoLock); /* Create the transient table that will receive the regenerated data. */ @@ -247,8 +250,7 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, /* Generate the data, if wanted. */ if (!stmt->skipData) - refresh_matview_datafill(dest, dataQuery, queryString, - matviewRel->rd_rel->relowner); + refresh_matview_datafill(dest, dataQuery, queryString, owner); /* Make the matview match the newly generated data. */ if (concurrent)
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers