title: Postgres 9.4 hangs during refreshing materialized view
body: <p>I am considering the problems with materialized views in Postgres 9.4.
  Sometimes query "refresh materialized view xxx" just hangs forever.</p>
  
  <p>The only way I found is to completely restart postgres service. After restart execution takes seconds.</p>
  
  <p>My view is not so complex it use about 10 tables.</p>
  
  <p>I've executed <code>select * from pg_stat_activity where state = 'active'</code> and the only running query was refresh view.</p>
  
  <p>This problem appears with CentOS operating system.</p>
  
  <p>What should I look when this problems comes next time? locks? or something else?</p>