You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a base table is modified before calling create_immv in a concurrent transaction, create_immv will create an IMMV inconsistent with the latest contents of the table.
Modify a table in a transaction A.
postgres=# begin ;BEGIN
postgres=*# insert into yyy values (10);
INSERT 01
Create an IMMV in a transaction B.
postgres=# begin ;BEGIN
postgres=*# select create_immv('mvyyy','select * from yyy'); -- blocked
Commit the transaction A.
postgres=*# commit;COMMIT
postgres=# select * from yyy;
i
----1210
(3 rows)
Commit the transaction B, the IMMV doesn't contain the inserted row.
(cont.)
NOTICE: could not create an index on immv "mvyyy" automatically
DETAIL: This target list does not have all the primary key columns, or this view does not contain GROUP BYor DISTINCT clause.
HINT: Create an index on the immv for efficient incremental maintenance.
create_immv
-------------2
(1 row)
postgres=*# end;COMMIT
postgres=# select * from mvyyy;
i
---12
(2 rows)
The text was updated successfully, but these errors were encountered:
If a base table is modified before calling create_immv in a concurrent transaction, create_immv will create an IMMV inconsistent with the latest contents of the table.
The text was updated successfully, but these errors were encountered: