title: pg_stat_activity doesn't update within a procedure or transaction
body: <p>I query <code>pg_stat_activity</code> but the contents seem to stay the same after the first time I query it within a plpgsql function body, <code>SERIALIZABLE</code> or <code>REPEATABLE READ</code> transaction.</p>
  
  <p>Why does <code>pg_stat_activity</code> not follow the rules for <code>READ COMMITTED</code> in a plpgsql procedure?</p>
  
  <p>How do I get the current status? I want to loop over a query against <code>pg_stat_activity</code> in plpgsql until another query running on another backend finishes.</p>