setupPostgres = async (osInfo, user, db, mode, dbName, pg_pass) => {
  await asyncSudoPostgres(
    [
      "psql",
      "-U",
      "postgres",
      "-c",
      `CREATE USER ${user} WITH CREATEDB PASSWORD '${pg_pass}';`,
    ],
    false,
    dryRun
  );
  await asyncSudoUser(user, ["createdb", dbName], false, dryRun);
  await asyncSudoPostgres(
    [
      "psql",
      "-U",
      "postgres",
      "-d",
      dbName,
      "-c",
      `ALTER SCHEMA public OWNER TO ${user};`,
    ],
    false,
    dryRun
  );
}
Setup Postgres server
@param osInfo
@param user
@param db
@param mode
@param dbName
@param pg_pass
@returns {Promise<void>}