From replica to master, do on replica host under postgres user:

# pg_ctl promote-D /var/db/postgres/data12