From cc1965a99bf87005f431804bbda0f723887a04d6 Mon Sep 17 00:00:00 2001 From: Kevin Grittner Date: Tue, 16 Jul 2013 12:55:44 -0500 Subject: Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY. This allows reads to continue without any blocking while a REFRESH runs. The new data appears atomically as part of transaction commit. Review questioned the Assert that a matview was not a system relation. This will be addressed separately. Reviewed by Hitoshi Harada, Robert Haas, Andres Freund. Merged after review with security patch f3ab5d4. --- src/backend/parser/gram.y | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/backend/parser') diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index f67ef0c9caf..5e9b3eda924 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -3301,11 +3301,12 @@ OptNoLog: UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; } *****************************************************************************/ RefreshMatViewStmt: - REFRESH MATERIALIZED VIEW qualified_name opt_with_data + REFRESH MATERIALIZED VIEW opt_concurrently qualified_name opt_with_data { RefreshMatViewStmt *n = makeNode(RefreshMatViewStmt); - n->relation = $4; - n->skipData = !($5); + n->concurrent = $4; + n->relation = $5; + n->skipData = !($6); $$ = (Node *) n; } ; -- cgit v1.2.3