code: func (p *Process) initDB() error {
  	log := p.log.New("fn", "initDB", "dir", p.dataDir)
  	log.Debug("starting initDB")
  
  	// ignore errors, since the db could be already initialized
  	// TODO(titanous): check errors when this is not the case
  	_ = p.runCmd(exec.Command(
  		p.binPath("initdb"),
  		"--pgdata", p.dataDir,
  		"--username=postgres",
  		"--encoding=UTF-8",
  		"--locale=en_US.UTF-8",
  	))
  
  	return p.writeHBAConf()
  }
docs: // initDB initializes the postgres data directory for a new dDB. This can fail
  // if the db has already been initialized, which is not a fatal error.
  //
  // This method should only be called by the primary of a shard. Standbys will
  // not need to initialize, as they will restore from an already running primary.