postgres promote hot_standby (archive_command = ‘:’) to master (archive_command = ”)

Assume we have

  1. master server (archive_command = ”)
  2. hot_standby server (archive_command = ‘:’)
  3. pg_receivewal server (from master slot)

What would be the correct procedure to promote hot standby server to master and change pg_receivewal slots?

My concern is a duplicate wal file mess between all 3 servers if done incorrectly.