v.24.1New Feature

Add max_materialized_views_size_for_table Setting to Limit Materialized Views per Table

Add settings max_materialized_views_size_for_table to limit the number of materialized views attached to a table. #58068 (zhongyuankai).
Introduce the max_materialized_views_size_for_table setting to limit the number of materialized views that can be attached to a single table.

Why it matters

This feature addresses the problem of unbounded growth in the number of materialized views attached to a table, which can cause performance degradation or management complexity. By limiting the number of attached materialized views, it helps maintain system stability and predictable resource usage.

How to use it

Users can apply this feature by setting the max_materialized_views_size_for_table parameter in the server configuration or session settings. This setting defines the maximum allowed number of materialized views attached to a specific table.