citusdata / citusdata/citus

Refresh materialized view of a router query does not go through router planner

Open
#4,297 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

`create materialized view` works fine, but `refresh materialized view ` fails. An example fix: https://github.com/citusdata/citus/commit/48025072431e3946ff342ff3e230840de6e08bbc

See discussions here: https://github.com/citusdata/citus/pull/4292/files#r517340937

```SQL
create materialized view router_view as select * from users_table WHERE user_id = 1 FOR UPDATE;
SELECT 7
Time: 133.988 ms
refresh materialized view router_view ;
ERROR: could not run distributed query with FOR UPDATE/SHARE commands
HINT: Consider using an equality filter on the distributed table's partition column.
Time: 3.502 ms
```

The bug is reproducible at least from Citus 8.3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.