doc-exports/docs/dws/dev/dws_04_0889.html
Lu, Huayi a24ca60074 DWS DEVELOPER 811 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-01-19 13:37:49 +00:00

44 lines
9.3 KiB
HTML

<a name="EN-US_TOPIC_0000001099134530"></a><a name="EN-US_TOPIC_0000001099134530"></a>
<h1 class="topictitle1">Connection Settings</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001099134530__en-us_topic_0059777636_p69637310112">This section describes parameters related to the connection mode between the client and server.</p>
<div class="section" id="EN-US_TOPIC_0000001099134530__s2d671f584b5647a19255e7c6a3d116aa"><a name="EN-US_TOPIC_0000001099134530__s2d671f584b5647a19255e7c6a3d116aa"></a><a name="s2d671f584b5647a19255e7c6a3d116aa"></a><h4 class="sectiontitle">max_connections</h4><p id="EN-US_TOPIC_0000001099134530__ab16a7d2206574058af94fc0babfc9b1f"><strong id="EN-US_TOPIC_0000001099134530__en-us_topic_0059777636_en-us_topic_0058967724_b47196620">Parameter description</strong>: Specifies the maximum number of allowed parallel connections to the database. This parameter influences the concurrent processing capability of the cluster.</p>
<p id="EN-US_TOPIC_0000001099134530__p251615331917"><strong id="EN-US_TOPIC_0000001099134530__b1979991434417">Type</strong>: POSTMASTER</p>
<p id="EN-US_TOPIC_0000001099134530__a033c8330e03f412884a1742780878208"><strong id="EN-US_TOPIC_0000001099134530__b10860327208">Value range</strong>: an integer. For CNs, the ranges from 1 to 16384. For DNs, the value ranges from 1 to 262143. Because there are internal connections in the cluster, the maximum value is rarely reached. If <strong id="EN-US_TOPIC_0000001099134530__b15480194712915">invalid value for parameter "max_connections"</strong> is displayed in the log, you need to decrease the <strong id="EN-US_TOPIC_0000001099134530__b191029547308">max_connections</strong> value for DNs.</p>
<p id="EN-US_TOPIC_0000001099134530__a6484ecbf671a458e9a42c04454e43c13"><strong id="EN-US_TOPIC_0000001099134530__b921920118155">Default value</strong>: <strong id="EN-US_TOPIC_0000001099134530__b113751017161512">800</strong> for CNs and <strong id="EN-US_TOPIC_0000001099134530__b16256203151">5000</strong> for DNs. If the default value is greater than the maximum value supported by kernel (determined when the <strong id="EN-US_TOPIC_0000001099134530__b172191611121517">gs_initdb</strong> command is executed), an error message will be displayed.</p>
<p id="EN-US_TOPIC_0000001099134530__ae4c883e2202045a4bb9b28ed591664f9"><strong id="EN-US_TOPIC_0000001099134530__en-us_topic_0059777636_b2809270516346">Setting suggestions</strong>:</p>
<p id="EN-US_TOPIC_0000001099134530__a08859f9f47374020a5b834e424691e97">Retain the default value of this parameter on the CN. Set this parameter on the DN to the following calculation result: Number of CNs x Value of this parameter on the CN.</p>
<p id="EN-US_TOPIC_0000001099134530__a8efe0f70507c49cbb33c51a772b37b6a">If the parameter is set to a large value, <span id="EN-US_TOPIC_0000001099134530__text2034046385">GaussDB(DWS)</span> requires more SystemV shared memories or semaphores, which may exceed the maximum default configuration of the OS. In this case, modify the value as needed.</p>
<div class="notice" id="EN-US_TOPIC_0000001099134530__note51821344104916"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="EN-US_TOPIC_0000001099134530__p7182154416496">The value of <strong id="EN-US_TOPIC_0000001099134530__b183671349093">max_connections</strong> is related to <a href="dws_04_0893.html#EN-US_TOPIC_0000001145694783__s7f44489cfdce4bbea287150fb7333b9e">max_prepared_transactions</a>. Before setting <strong id="EN-US_TOPIC_0000001099134530__b4358142916109">max_connections</strong>, ensure that the value of <strong id="EN-US_TOPIC_0000001099134530__b9768541131019">max_prepared_transactions</strong> is greater than or equal to that of <strong id="EN-US_TOPIC_0000001099134530__b1721635171119">max_connections</strong>. In this way, each session has a prepared transaction in the waiting state.</p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001099134530__s3c7b3697f6a748f0baf5754e3c4b5d19"><h4 class="sectiontitle">sysadmin_reserved_connections</h4><p id="EN-US_TOPIC_0000001099134530__a8db7e896c45c42d2b5db52e5c5d1cf92"><strong id="EN-US_TOPIC_0000001099134530__en-us_topic_0059777636_a4b31a78195104adf92b9eed83bdbcd10">Parameter description</strong>: Specifies the minimum number of connections reserved for administrators.</p>
<p id="EN-US_TOPIC_0000001099134530__p733324718917"><strong id="EN-US_TOPIC_0000001099134530__b1997610149441">Type</strong>: POSTMASTER</p>
<p id="EN-US_TOPIC_0000001099134530__a6186f83bbb8144a69a55c8242f481fdc"><strong id="EN-US_TOPIC_0000001099134530__en-us_topic_0059777487_en-us_topic_0058967566_b6696864">Value range</strong>: an integer ranging from 0 to 262143</p>
<p id="EN-US_TOPIC_0000001099134530__a26b5925222734322a475d763ec44953c"><strong id="EN-US_TOPIC_0000001099134530__b842352706185015">Default value</strong>: <strong id="EN-US_TOPIC_0000001099134530__b842352706185018">3</strong></p>
</div>
<div class="section" id="EN-US_TOPIC_0000001099134530__sb9319017186d42d3bb1352d83a3c8b79"><h4 class="sectiontitle">application_name</h4><p id="EN-US_TOPIC_0000001099134530__ae39b72730bb945799b082fcf0b231f5d"><strong id="EN-US_TOPIC_0000001099134530__en-us_topic_0059777636_a256c2bab538d4586b07e2db0ba045933">Parameter description</strong>: Specifies the name of the client program connecting to the database.</p>
<p id="EN-US_TOPIC_0000001099134530__p1727443129"><strong id="EN-US_TOPIC_0000001099134530__b612055616446">Type</strong>: USERSET</p>
<p id="EN-US_TOPIC_0000001099134530__a76b2373b366e484f8a7ffc17a9e5c14d"><strong id="EN-US_TOPIC_0000001099134530__en-us_topic_0059777636_a0569bf5cd0fd491c8868b390ab1eed54">Value range</strong>: a string</p>
<p id="EN-US_TOPIC_0000001099134530__a341a9547ac924967a40f75d151e44b80"><strong id="EN-US_TOPIC_0000001099134530__en-us_topic_0059777636_a0bdfce78fa494bdd8c2c0156c1a0393d">Default value</strong>: <strong id="EN-US_TOPIC_0000001099134530__b842352706202555">gsql</strong></p>
</div>
<div class="section" id="EN-US_TOPIC_0000001099134530__section4834457114318"><a name="EN-US_TOPIC_0000001099134530__section4834457114318"></a><a name="section4834457114318"></a><h4 class="sectiontitle">connection_info</h4><p id="EN-US_TOPIC_0000001099134530__p209712583437"><strong id="EN-US_TOPIC_0000001099134530__b550332111816">Parameter description</strong>: Specifies the database connection information, including the driver type, driver version, driver deployment path, and process owner. (This is an O&amp;M parameter. Do not configure it by yourself.)</p>
<p id="EN-US_TOPIC_0000001099134530__p727782016135"><strong id="EN-US_TOPIC_0000001099134530__b15716105614419">Type</strong>: USERSET</p>
<p id="EN-US_TOPIC_0000001099134530__p1697185824318"><strong id="EN-US_TOPIC_0000001099134530__b920319251182">Value range</strong>: a string</p>
<p id="EN-US_TOPIC_0000001099134530__p7971145894312"><strong id="EN-US_TOPIC_0000001099134530__b1334182615182">Default value</strong>: an empty string</p>
<div class="note" id="EN-US_TOPIC_0000001099134530__note11998020131414"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001099134530__ul5214929175810"><li id="EN-US_TOPIC_0000001099134530__li1221452917581">An empty string indicates that the driver connected to the database does not support automatic setting of the <strong id="EN-US_TOPIC_0000001099134530__b124851628181817">connection_info</strong> parameter or the parameter is not set by users in applications.</li><li id="EN-US_TOPIC_0000001099134530__li421462916588">The following is an example of the concatenated value of <strong id="EN-US_TOPIC_0000001099134530__b7810143041810">connection_info</strong>:<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001099134530__screen36131149104519"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="err">{</span><span class="ss">&quot;driver_name&quot;</span><span class="p">:</span><span class="ss">&quot;ODBC&quot;</span><span class="p">,</span><span class="ss">&quot;driver_version&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;(GaussDB 8.1.1 build af002019) compiled at 2020-01-10 05:43:20 commit 6995 last mr 11566 debug&quot;</span><span class="p">,</span><span class="ss">&quot;driver_path&quot;</span><span class="p">:</span><span class="ss">&quot;/usr/local/lib/psqlodbcw.so&quot;</span><span class="p">,</span><span class="ss">&quot;os_user&quot;</span><span class="p">:</span><span class="ss">&quot;dbadmin&quot;</span><span class="err">}</span><span class="w"></span>
</pre></div></td></tr></table></div>
</div>
<p id="EN-US_TOPIC_0000001099134530__p14858414192914"><strong id="EN-US_TOPIC_0000001099134530__b10747143211189">driver_name</strong> and <strong id="EN-US_TOPIC_0000001099134530__b12748193231817">driver_version</strong> are displayed by default. Whether <strong id="EN-US_TOPIC_0000001099134530__b97481832171813">driver_path</strong> and <strong id="EN-US_TOPIC_0000001099134530__b1674953219186">os_user</strong> are displayed is determined by users.</p>
</li></ul>
</div></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0888.html">Connection and Authentication</a></div>
</div>
</div>