postgres: add replication check