mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +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:
@ -3541,7 +3541,8 @@ ATRewriteTables(List **wqueue, LOCKMODE lockmode)
|
||||
heap_close(OldHeap, NoLock);
|
||||
|
||||
/* Create transient table that will receive the modified data */
|
||||
OIDNewHeap = make_new_heap(tab->relid, NewTableSpace);
|
||||
OIDNewHeap = make_new_heap(tab->relid, NewTableSpace, false,
|
||||
AccessExclusiveLock);
|
||||
|
||||
/*
|
||||
* Copy the heap data into the new table with the desired
|
||||
|
Reference in New Issue
Block a user