Calculate Postgres replication lag