Skip to content

refresh-matview-blocking

Refresh materialized views concurrently.

Severity: warning · Lock: ACCESS EXCLUSIVE

A plain refresh locks the view for the whole recompute, so every read of it waits.

REFRESH MATERIALIZED VIEW daily_stats;
REFRESH MATERIALIZED VIEW CONCURRENTLY daily_stats;

Concurrent refresh needs a unique index on the view.

To skip this rule for one statement, put -- pgdeadbolt-ignore refresh-matview-blocking on the line above it.