mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
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
.
This commit is contained in:
@@ -3241,6 +3241,7 @@ _copyRefreshMatViewStmt(const RefreshMatViewStmt *from)
|
||||
{
|
||||
RefreshMatViewStmt *newnode = makeNode(RefreshMatViewStmt);
|
||||
|
||||
COPY_SCALAR_FIELD(concurrent);
|
||||
COPY_SCALAR_FIELD(skipData);
|
||||
COPY_NODE_FIELD(relation);
|
||||
|
||||
|
@@ -1521,6 +1521,7 @@ _equalCreateTableAsStmt(const CreateTableAsStmt *a, const CreateTableAsStmt *b)
|
||||
static bool
|
||||
_equalRefreshMatViewStmt(const RefreshMatViewStmt *a, const RefreshMatViewStmt *b)
|
||||
{
|
||||
COMPARE_SCALAR_FIELD(concurrent);
|
||||
COMPARE_SCALAR_FIELD(skipData);
|
||||
COMPARE_NODE_FIELD(relation);
|
||||
|
||||
|
Reference in New Issue
Block a user