There is nothing native to compute this. This was asked a month or so ago. The best the poster came up with was a regular query on master DB which updates a timestamptz field. Assuming master and slave have clocks in sync, it is simple to compute the lag from that.