client_encoding='UTF ' in primary_conninfo You should just ignore `client_encoding` when writing `primary_conninfo` Reported by Yurii Lazutkin