HN2new | past | comments | ask | show | jobs | submitlogin

I’d like to refresh a portion of a materialized view.

I have some big materialized views that take a long time to refresh concurrently, and I wish I could refresh a subset of the entire view’s data.



What do you mean by "refresh" here? Doesn't a materialized view get updated synchronously with updates to its constituent tables?


Nope, you must run

  REFRESH MATERIALIZED VIEW mymatview;
Which does a full view update.

See https://www.postgresql.org/docs/current/rules-materializedvi...


If Postgres were ClickHouse, it would refresh materialized views synchronously on INSERT... but for Postgres it isn't.


I believe SQL Server does this, but Postgres does not.


Maybe https://github.com/sraoss/pg_ivm might be of help?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: