Fix an exception in the (rather unusual) case of attaching Patroni to an existing running replica.
Fix an exception in the (rather unusual) case of attaching Patroni to an existing running replica.

zalando/patroni,zalando/patroni,pgexperts/patroni,pgexperts/patroni