> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# set_primary_host

<div className="kinetica-pydoc">
  <div className="dl py method">
    <div className="dt sig sig-object py" id="gpudb.GPUdb.set_primary_host"> <span className="sig-name descname"><span className="pre">set\_primary\_host</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">new\_primary\_host</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">start\_using\_new\_primary\_host</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">False</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">delete\_old\_primary\_host</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">False</span></span></span><span className="sig-paren">)</span><a href="https://github.com/kineticadb/kinetica-api-python/blob/master/gpudb/gpudb.py#L7706"><span className="viewcode-link"><span className="pre">\[source]</span></span></a></div>

    <div className="dd">
      <p>Set the primary host for this client. Start using this host per the user’s directions. Also, either delete any existing primary host information, or relegate it to the ranks of a backup host.</p>
      <p><strong>Parameters</strong></p>

      <div className="blockquote">
        <div>
          <div className="dl simple">
            <div className="dt">value (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>A string containing the full URL of the new primary host (of the format ‘http\[s]://X.X.X.X:PORT\[/httpd-name]’). Must have valid URL format. May be part of the given back-up hosts, or be a completely new one.</p>
            </div>

            <div className="dt">start\_using\_new\_primary\_host (<span className="em">bool</span>) –</div>

            <div className="dd">
              <p>Boolean flag indicating if the new primary host should be used starting immediately. Please be cautious about setting the value of this flag to True; there may be unintended consequences regarding query chaining. Caveat: if values given is False, but <span className="em">delete\_old\_primary\_host</span> is True and the old primary host, if any, was being used at the time of this function call, then the client still DOES switch over to the new primary host. Default value is False.</p>
            </div>

            <div className="dt">delete\_old\_primary\_host (<span className="em">bool</span>) –</div>

            <div className="dd">
              <p>Boolean flag indicating that if a primary host was already set, delete that information. If False, then any existing primary host URL would treated as a regular back-up cluster’s host. Default value is False.</p>
            </div>
          </div>
        </div>
      </div>

      <div className="deprecated">
        <p><span className="versionmodified deprecated">Deprecated since version 7.1.0.0: </span>As of version 7.1.0.0, this method will no longer be functional. This method will be a no-op, not changing primary host. port. The method will be removed in version 7.2.0.0. The only way to set the primary host is via <span className="cite">GPUdb.Options</span> at <span className="cite">GPUdb</span> initialization. It cannot be changed after that.</p>
      </div>
    </div>
  </div>
</div>
