doc-exports/docs/dws/dev/dws_04_0901.html
Lu, Huayi e6fa411af0 DWS DEV 830.201 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-16 07:24:04 +00:00

62 lines
16 KiB
HTML

<a name="EN-US_TOPIC_0000001233761835"></a><a name="EN-US_TOPIC_0000001233761835"></a>
<h1 class="topictitle1">Settings</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001233761835__s9be202a993664326975a0e79a16d60c0"><h4 class="sectiontitle">wal_level</h4><p id="EN-US_TOPIC_0000001233761835__a53cba7f026b84983bebeb0eabad6c9c1"><strong id="EN-US_TOPIC_0000001233761835__en-us_topic_0059778393_en-us_topic_0058967585_b32157864">Parameter description:</strong> Specifies the level of the information that is written to WALs.</p>
<p id="EN-US_TOPIC_0000001233761835__p11355934103713"><strong id="EN-US_TOPIC_0000001233761835__b1428616774616">Type</strong>: POSTMASTER</p>
<p id="EN-US_TOPIC_0000001233761835__a3b8c71f4864f4e9d9ad4aff16c9d8d2a"><strong id="EN-US_TOPIC_0000001233761835__en-us_topic_0059778393_en-us_topic_0058967585_b32231495">Value range</strong>: enumerated values</p>
<ul id="EN-US_TOPIC_0000001233761835__uc96941a3701c417dac4e41c52c59a14f"><li id="EN-US_TOPIC_0000001233761835__laef45d91f09e4fa19528348a96628275">minimal<p id="EN-US_TOPIC_0000001233761835__aeb336641a4ee41e48436f3972fdfc31d"><a name="EN-US_TOPIC_0000001233761835__laef45d91f09e4fa19528348a96628275"></a><a name="laef45d91f09e4fa19528348a96628275"></a>Advantages: Certain bulk operations (including creating tables and indexes, executing cluster operations, and copying tables) are safely skipped in logging, which can make those operations much faster.</p>
<p id="EN-US_TOPIC_0000001233761835__ae93f0a3687df4020a6627f4445df132c">Disadvantages: WALs only contain basic information required for the recovery from a database server crash or an emergency shutdown. Archived WALs cannot be used to restore data.</p>
</li><li id="EN-US_TOPIC_0000001233761835__l197f5121181b4527b797794440b13924">archive<p id="EN-US_TOPIC_0000001233761835__ac3796cf76e6441a7a0b114a438797a9a"><a name="EN-US_TOPIC_0000001233761835__l197f5121181b4527b797794440b13924"></a><a name="l197f5121181b4527b797794440b13924"></a>Adds logging required for WAL archiving, supporting the database restoration from archives.</p>
</li><li id="EN-US_TOPIC_0000001233761835__lb94c580b741e4320a14af00e3c979039">hot_standby<ul id="EN-US_TOPIC_0000001233761835__u572d6c9e69984083be87fd7ddecbcad9"><li id="EN-US_TOPIC_0000001233761835__l43fc3f0675bc425f83e6295819f20879">Further adds information required to run SQL queries on a standby server and takes effect after a server restart.</li><li id="EN-US_TOPIC_0000001233761835__l20f65680e03447b1865efaceeeb42f9b">To enable read-only queries on a standby server, the <strong id="EN-US_TOPIC_0000001233761835__b0841614102214">wal_level</strong> parameter must be set to <strong id="EN-US_TOPIC_0000001233761835__b1184112145227">hot_standby</strong> on the primary server and the same value must be set on the standby server. There is little measurable difference in performance between using <strong id="EN-US_TOPIC_0000001233761835__b18841814202220">hot_standby</strong> and <strong id="EN-US_TOPIC_0000001233761835__b108413142228">archive</strong> levels, so feedback is welcome if any production performance impacts are noticeable.</li></ul>
</li></ul>
<p id="EN-US_TOPIC_0000001233761835__a5b02ca9a62d14d478ceb00cb446a12b5"><strong id="EN-US_TOPIC_0000001233761835__b60786481_1">Default value</strong>: <strong id="EN-US_TOPIC_0000001233761835__b842352706165840">hot_standby</strong></p>
<div class="notice" id="EN-US_TOPIC_0000001233761835__n30534c50e76c4f50be0ffa77526ffdde"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="EN-US_TOPIC_0000001233761835__u6715cc8bf5e04bb8aad2cfaba469a97c"><li id="EN-US_TOPIC_0000001233761835__lcd6cc9b9e6574fef842fde641ec274b9">To enable WAL archiving and data streaming replication between primary and standby servers, set this parameter to <strong id="EN-US_TOPIC_0000001233761835__b14835171482215">archive</strong> or <strong id="EN-US_TOPIC_0000001233761835__b1383541417224">hot_standby</strong>.</li><li id="EN-US_TOPIC_0000001233761835__led89b2d2b3a243d69691c69d72b5bd65">If this parameter is set to <strong id="EN-US_TOPIC_0000001233761835__b2838141462218">archive</strong>, <strong id="EN-US_TOPIC_0000001233761835__b84235270693253">hot_standby</strong> must be set to <strong id="EN-US_TOPIC_0000001233761835__b1683820145228">off</strong>. Otherwise, the database startup fails.</li></ul>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001233761835__sd030b2a8b4084ddfa6b1e547efdc42c6"><h4 class="sectiontitle">synchronous_commit</h4><p id="EN-US_TOPIC_0000001233761835__a96966d76c548471e84d4f7c5d801fedd"><strong id="EN-US_TOPIC_0000001233761835__en-us_topic_0059778393_en-us_topic_0058967585_b585119011822">Parameter description</strong>: Specifies the synchronization mode of the current transaction.</p>
<p id="EN-US_TOPIC_0000001233761835__p109551819123711"><strong id="EN-US_TOPIC_0000001233761835__b189512086467">Type</strong>: USERSET</p>
<p id="EN-US_TOPIC_0000001233761835__a30ff9eb053974e2d900e45a0cd6e990c"><strong id="EN-US_TOPIC_0000001233761835__en-us_topic_0059778393_a7a605461f9d84bd5856d5f054bdd0c48">Value range</strong>: enumerated values</p>
<ul id="EN-US_TOPIC_0000001233761835__uf0355d57c2804839a2d2e261067ec2a0"><li id="EN-US_TOPIC_0000001233761835__l5d7890fb7cb14b0081aadf21588ca48a"><strong id="EN-US_TOPIC_0000001233761835__b7849151432210">on</strong> indicates synchronization logs of a standby server are flushed to disks.</li><li id="EN-US_TOPIC_0000001233761835__l6113aa4839364da6b69f330dfee7ce97"><strong id="EN-US_TOPIC_0000001233761835__b178502014162212">off</strong> indicates asynchronous commit.</li><li id="EN-US_TOPIC_0000001233761835__l5cef96a1b6804a87a303dbe08e72444e"><strong id="EN-US_TOPIC_0000001233761835__b396278730171633">local</strong> indicates local commit.</li><li id="EN-US_TOPIC_0000001233761835__l7a6308ff0faa4872bc5404a98cd57d45"><strong id="EN-US_TOPIC_0000001233761835__b254680692171635">remote_write</strong> indicates synchronization logs of a standby server are written to disks.</li><li id="EN-US_TOPIC_0000001233761835__l477a247b5fe64e619b805d4991ca135a"><strong id="EN-US_TOPIC_0000001233761835__b189233902171648">remote_receive</strong> indicates synchronization logs of a standby server are required to receive data.</li></ul>
<p id="EN-US_TOPIC_0000001233761835__ad3d37f92891d4a53a680303011b73dc2"><strong id="EN-US_TOPIC_0000001233761835__b1199421617">Default value</strong>: <strong id="EN-US_TOPIC_0000001233761835__b1182689977">on</strong></p>
</div>
<div class="section" id="EN-US_TOPIC_0000001233761835__s1b3e06d5637240328daaae0f96ecd56d"><h4 class="sectiontitle">wal_buffers</h4><p id="EN-US_TOPIC_0000001233761835__a31a3a0fbf9f248e598bcdff2d806cd11"><strong id="EN-US_TOPIC_0000001233761835__b128671314112216">Parameter description</strong>: Specifies the number of XLOG_BLCKSZs used for storing WAL data. The size of each XLOG_BLCKSZ is 8 KB.</p>
<p id="EN-US_TOPIC_0000001233761835__p870916174416"><strong id="EN-US_TOPIC_0000001233761835__b7468121254616">Type</strong>: POSTMASTER</p>
<p id="EN-US_TOPIC_0000001233761835__acf6d209bf50842748017dc87f79277c6"><strong id="EN-US_TOPIC_0000001233761835__b53998411696">Value range</strong>: -1 to 2<sup id="EN-US_TOPIC_0000001233761835__sup1040318410916">18</sup>. The unit is 8 KB.</p>
<ul id="EN-US_TOPIC_0000001233761835__u45067431f5fd43c6af5627be105ccc6e"><li id="EN-US_TOPIC_0000001233761835__lcad533583c014adea3a75684b64a758f">If this parameter is set to <strong id="EN-US_TOPIC_0000001233761835__b1302928340173034">-1</strong>, the value of <strong id="EN-US_TOPIC_0000001233761835__b1201224604173034">wal_buffers</strong> is automatically changed to 1/32 of <strong id="EN-US_TOPIC_0000001233761835__b1465975669173034">shared_buffers</strong>. The minimum value is 8 x <strong id="EN-US_TOPIC_0000001233761835__b84235270692216">XLOG_BLCKSZ</strong>, and the maximum value is 2048 x <strong id="EN-US_TOPIC_0000001233761835__b84235270692118">XLOG_BLCKSZ</strong>.</li><li id="EN-US_TOPIC_0000001233761835__la3df3c917c7b4ffeb3d8a998309bb0f0">If it is set to a value smaller than <strong id="EN-US_TOPIC_0000001233761835__b1799840862173021">8</strong>, the value <strong id="EN-US_TOPIC_0000001233761835__b1303803284173021">8</strong> is used. If it is set to a value greater than 2048, the value <strong id="EN-US_TOPIC_0000001233761835__b934883289131147">2048</strong> is used.</li></ul>
<p id="EN-US_TOPIC_0000001233761835__a556eaad7dfbb48009bc6cd5658ba7b24"><strong id="EN-US_TOPIC_0000001233761835__b26917141">Default value</strong>: <strong id="EN-US_TOPIC_0000001233761835__b842352706104513">256 MB</strong></p>
<p id="EN-US_TOPIC_0000001233761835__ab21cb7c9898644e6840fa35c96c5448b"><strong id="EN-US_TOPIC_0000001233761835__b842352706132227">Setting suggestions</strong>: The content of WAL buffers is written to disks at each transaction commit, and setting this parameter to a large value does not significantly improve system performance. Setting this parameter to hundreds of megabytes can improve the disk writing performance on the server, to which a large number of transactions are committed. Based on experiences, the default value meets user requirements in most cases.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001233761835__seb6fde0eb5bf4b5488d9f6069aeeaa5c"><a name="EN-US_TOPIC_0000001233761835__seb6fde0eb5bf4b5488d9f6069aeeaa5c"></a><a name="seb6fde0eb5bf4b5488d9f6069aeeaa5c"></a><h4 class="sectiontitle">commit_delay</h4><p id="EN-US_TOPIC_0000001233761835__abf48d2d0f29b4552960389a4b5253b79"><strong id="EN-US_TOPIC_0000001233761835__en-us_topic_0059778393_en-us_topic_0058967585_b46877363">Parameter description</strong>: Specifies the duration of committed data be stored in the WAL buffer.</p>
<p id="EN-US_TOPIC_0000001233761835__p5544152619466"><strong id="EN-US_TOPIC_0000001233761835__b18810112174620">Type</strong>: USERSET</p>
<p id="EN-US_TOPIC_0000001233761835__a17ca0a4d9af64fb99dab86285e8c0b96"><strong id="EN-US_TOPIC_0000001233761835__b17810037969">Value range</strong>: an integer, ranging from 0 to 100000 (unit: μs). <strong id="EN-US_TOPIC_0000001233761835__b1895920466720">0</strong> indicates no delay.</p>
<p id="EN-US_TOPIC_0000001233761835__a5ebb43d427274cad8ee0729ecf417b6a"><strong id="EN-US_TOPIC_0000001233761835__b168092314613">Default value</strong>: <strong id="EN-US_TOPIC_0000001233761835__b1881112311469">0</strong></p>
<div class="notice" id="EN-US_TOPIC_0000001233761835__nd205762172664997bae80d91567e2c62"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="EN-US_TOPIC_0000001233761835__u41ae88b02b9940b6942c025983f44141"><li id="EN-US_TOPIC_0000001233761835__lc00c8b958c1f491482ec74c4e14c0e49">When this parameter is set to a value other than 0, the committed transaction is stored in the WAL buffer instead of being written to the WAL immediately. Then, the WalWriter process flushes the buffer out to disks periodically.</li><li id="EN-US_TOPIC_0000001233761835__lf838215a72ba44f08136f04ecef55031">If system load is high, other transactions are probably ready to be committed within the delay. If no transactions are waiting to be submitted, the delay is a waste of time.</li></ul>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001233761835__sf723fa16d18f458d8c205d93312c515a"><h4 class="sectiontitle">commit_siblings</h4><p id="EN-US_TOPIC_0000001233761835__ab7ee5ba3c5604ce59329e97974ac1334"><strong id="EN-US_TOPIC_0000001233761835__b2042310123209">Parameter description</strong>: Specifies a limit on the number of ongoing transactions. If the number of ongoing transactions is greater than the limit, a new transaction will wait for the period of time specified by <a href="#EN-US_TOPIC_0000001233761835__seb6fde0eb5bf4b5488d9f6069aeeaa5c">commit_delay</a> before it is submitted. If the number of ongoing transactions is less than the limit, the new transaction is immediately written into a WAL.</p>
<p id="EN-US_TOPIC_0000001233761835__p1572313357461"><strong id="EN-US_TOPIC_0000001233761835__b398091294613">Type</strong>: USERSET</p>
<p id="EN-US_TOPIC_0000001233761835__a0e51cb4bc6ca4b86a6a1cbc3248ad4df"><strong id="EN-US_TOPIC_0000001233761835__en-us_topic_0059778393_en-us_topic_0058967585_b54591201">Value range</strong>: an integer ranging from 0 to 1000</p>
<p id="EN-US_TOPIC_0000001233761835__a1e03abba0b704a4e8d8fc2d70266372a"><strong id="EN-US_TOPIC_0000001233761835__b57723173">Default value</strong>: <strong id="EN-US_TOPIC_0000001233761835__b842352706165917">5</strong></p>
</div>
<div class="section" id="EN-US_TOPIC_0000001233761835__section1771453071415"><h4 class="sectiontitle">wal_compression</h4><p id="EN-US_TOPIC_0000001233761835__p671412308148"><strong id="EN-US_TOPIC_0000001233761835__b1088317358134">Parameter description</strong>: Specifies whether to compress FPI pages.</p>
<p id="EN-US_TOPIC_0000001233761835__p1271416303143"><strong id="EN-US_TOPIC_0000001233761835__b0789185912131">Type</strong>: USERSET</p>
<p id="EN-US_TOPIC_0000001233761835__p671543010141"><strong id="EN-US_TOPIC_0000001233761835__b729171141416">Value range</strong>: Boolean</p>
<ul id="EN-US_TOPIC_0000001233761835__ul1258872413409"><li id="EN-US_TOPIC_0000001233761835__li13588624184019"><strong id="EN-US_TOPIC_0000001233761835__b9227136147">on</strong>: enable the compression</li><li id="EN-US_TOPIC_0000001233761835__li65880248408"><strong id="EN-US_TOPIC_0000001233761835__b6813122751417">off</strong>: disable the compression</li></ul>
<p id="EN-US_TOPIC_0000001233761835__p1171593011144"><strong id="EN-US_TOPIC_0000001233761835__b204551534111417">Default value</strong>: <strong id="EN-US_TOPIC_0000001233761835__b546053411413">on</strong></p>
<div class="notice" id="EN-US_TOPIC_0000001233761835__note471518306149"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="EN-US_TOPIC_0000001233761835__ul971517301142"><li id="EN-US_TOPIC_0000001233761835__li8715143001412">Only zlib compression algorithm is supported.</li><li id="EN-US_TOPIC_0000001233761835__li13715193010142">For clusters that are upgraded to the current version from an earlier version, this parameter is set to <strong id="EN-US_TOPIC_0000001233761835__b121413398164">off</strong> by default. You can run the <strong id="EN-US_TOPIC_0000001233761835__b9759108101718">gs_guc</strong> command to enable the FPI compression function if needed.</li><li id="EN-US_TOPIC_0000001233761835__li770343415463">If the current version is a newly installed version, this parameter is set to <strong id="EN-US_TOPIC_0000001233761835__b5110444181718">on</strong> by default.</li><li id="EN-US_TOPIC_0000001233761835__li684171015474">If this parameter is manually enabled for a cluster upgraded from an earlier version, the cluster cannot be rolled back.</li></ul>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001233761835__section18715163012142"><h4 class="sectiontitle">wal_compression_level</h4><p id="EN-US_TOPIC_0000001233761835__p1571553081411"><strong id="EN-US_TOPIC_0000001233761835__b1445914281189">Parameter description</strong>: Specifies the compression level of zlib compression algorithm when the <strong id="EN-US_TOPIC_0000001233761835__b183311557171815">wal_compression</strong> parameter is enabled.</p>
<p id="EN-US_TOPIC_0000001233761835__p4715130161411"><strong id="EN-US_TOPIC_0000001233761835__b1975815981817">Type</strong>: USERSET</p>
<p id="EN-US_TOPIC_0000001233761835__p107157308141"><strong id="EN-US_TOPIC_0000001233761835__b17412141910">Value range</strong>: an integer ranging from 0 to 9.</p>
<ul id="EN-US_TOPIC_0000001233761835__ul158421716475"><li id="EN-US_TOPIC_0000001233761835__li4584171784714"><strong id="EN-US_TOPIC_0000001233761835__b43542317194">0</strong> indicates no compression.</li><li id="EN-US_TOPIC_0000001233761835__li458461744713"><strong id="EN-US_TOPIC_0000001233761835__b197461542191910">1</strong> indicates the lowest compression ratio.</li><li id="EN-US_TOPIC_0000001233761835__li4585171754713"><strong id="EN-US_TOPIC_0000001233761835__b02301506191">9</strong> indicates the highest compression ratio.</li></ul>
<p id="EN-US_TOPIC_0000001233761835__p1571533016143"><strong id="EN-US_TOPIC_0000001233761835__b106755518192">Default value</strong>: <strong id="EN-US_TOPIC_0000001233761835__b14680175121918">9</strong></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0900.html">Write Ahead Logs</a></div>
</div>
</div>