title: How to check the replication delay in PostgreSQL?
body: <p>I would like to measure time between insert data into master-table and slave-table using streaming replication in PostgreSQL 9.3. For this I create table <em>test_time</em> with 2 fields id(serial), t(text). After that added a trigger:</p>
  
  <p><code>cur_time:=to_char(current_timestamp, 'HH12:MI:SS:MS:US');
  update test_time set t=cur_time where id=new.id;</code></p>
  
  <p>But the time is the same in both tables.
  How can I measure delay time</p>