forked from docs/doc-exports
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>
46 lines
12 KiB
HTML
46 lines
12 KiB
HTML
<a name="EN-US_TOPIC_0000001134434168"></a><a name="EN-US_TOPIC_0000001134434168"></a>
|
|
|
|
<h1 class="topictitle1">Redistributing Data</h1>
|
|
<div id="body0000001134434168"><p id="EN-US_TOPIC_0000001134434168__p8060118">Data redistribution, where data in existing nodes is evenly allocated to the new nodes after you scale out a cluster, is a time-consuming yet crucial task that accelerates service response.</p>
|
|
<p id="EN-US_TOPIC_0000001134434168__p1923312232718">By default, redistribution is automatically started after cluster scale-out. For enhanced reliability, disable the automatic redistribution function and manually start a redistribution task after the scale-out is successful. In this way, both scale-out and redistribution can be retried upon failures.</p>
|
|
<p id="EN-US_TOPIC_0000001134434168__p1986711918558">Currently, <a href="#EN-US_TOPIC_0000001134434168__section858715017148">offline redistribution</a> and <a href="#EN-US_TOPIC_0000001134434168__section2706112181411">online redistribution</a> are supported. The default mode is offline redistribution.</p>
|
|
<div class="notice" id="EN-US_TOPIC_0000001134434168__note147861811023"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="EN-US_TOPIC_0000001134434168__ul695616148319"><li id="EN-US_TOPIC_0000001134434168__li295611145311">The cluster redistribution function is supported in 8.1.1.200 or later.</li><li id="EN-US_TOPIC_0000001134434168__li995610142035">This function can be manually enabled only when the cluster task information displays <strong id="EN-US_TOPIC_0000001134434168__b1236318405323">To be redistributed</strong> after scale-out.</li><li id="EN-US_TOPIC_0000001134434168__li1095618149318">You can also select the redistribution mode when you configure cluster scale-out (see <a href="dws_01_0023.html#EN-US_TOPIC_0000001180320133__li1283703664815">Configure advanced parameters</a>).</li></ul>
|
|
</div></div>
|
|
<div class="section" id="EN-US_TOPIC_0000001134434168__section858715017148"><a name="EN-US_TOPIC_0000001134434168__section858715017148"></a><a name="section858715017148"></a><h4 class="sectiontitle">Offline Redistribution</h4><p id="EN-US_TOPIC_0000001134434168__p6133369155"><strong id="EN-US_TOPIC_0000001134434168__b9288175116382">Precautions</strong></p>
|
|
<ul id="EN-US_TOPIC_0000001134434168__ul146801016335"><li id="EN-US_TOPIC_0000001134434168__li13681101203315">In offline redistribution mode, the database does not support DDL and DCL operations. Tables that are being redistributed support only DQL operations.</li><li id="EN-US_TOPIC_0000001134434168__li1045633582310">During table redistribution, a shared lock is added to tables. All insert, update, and delete operations as well as DDL operations on the tables are blocked for a long time, which may cause a lock wait timeout. Do not perform queries that take longer than 20 minutes during the redistribution (the default time for applying for the write lock during redistribution is 20 minutes). Otherwise, data redistribution may fail due to lock wait timeout.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001134434168__p7776234114214"><strong id="EN-US_TOPIC_0000001134434168__b168977404404">Procedure</strong></p>
|
|
</div>
|
|
<ol id="EN-US_TOPIC_0000001134434168__ol9180552003"><li id="EN-US_TOPIC_0000001134434168__li391312411317"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001134434168__li11952509114244"><span>Choose <span class="uicontrol" id="EN-US_TOPIC_0000001134434168__uicontrol923002118303"><b>Clusters</b></span>. All clusters are displayed by default.</span></li><li id="EN-US_TOPIC_0000001134434168__li25916796163327"><span>In the <span class="parmname" id="EN-US_TOPIC_0000001134434168__parmname347910502403"><b>Operation</b></span> column of the target cluster, choose <span class="menucascade" id="EN-US_TOPIC_0000001134434168__menucascade1647911506400"><b><span class="uicontrol" id="EN-US_TOPIC_0000001134434168__uicontrol2479175004015">More</span></b> > <b><span class="uicontrol" id="EN-US_TOPIC_0000001134434168__uicontrol194791050114019">Redistribute</span></b></span>, as shown in the following figure.</span><p><p id="EN-US_TOPIC_0000001134434168__p67015478161155"></p>
|
|
<p id="EN-US_TOPIC_0000001134434168__p893823571517"><span><img id="EN-US_TOPIC_0000001134434168__image12454436101517" src="figure/en-us_image_0000001163636428.png" width="432.93601400000006" height="101.215261" title="Click to enlarge" class="imgResize"></span></p>
|
|
</p></li><li id="EN-US_TOPIC_0000001134434168__li3876347182410"><span>On the <strong id="EN-US_TOPIC_0000001134434168__b1964717586539">Redistribute</strong> page that is displayed, keep the default <strong id="EN-US_TOPIC_0000001134434168__b48921849135410">offline</strong> redistribution mode and click <strong id="EN-US_TOPIC_0000001134434168__b142682523545">Next: Confirm</strong> to submit the task.</span><p><p id="EN-US_TOPIC_0000001134434168__p14861112022015"><span><img id="EN-US_TOPIC_0000001134434168__image1312293052010" src="figure/en-us_image_0000001204891199.png" width="407.9775" height="195.212745" title="Click to enlarge" class="imgResize"></span></p>
|
|
<p id="EN-US_TOPIC_0000001134434168__p1516173173610"><span><img id="EN-US_TOPIC_0000001134434168__image127501738163616" src="figure/en-us_image_0000001204878747.png" width="406.98" height="195.62172" title="Click to enlarge" class="imgResize"></span></p>
|
|
<p id="EN-US_TOPIC_0000001134434168__p1330110501431"><span><img id="EN-US_TOPIC_0000001134434168__image56671450114320" src="figure/en-us_image_0000001204760551.png" width="408.975" height="136.74621100000002" title="Click to enlarge" class="imgResize"></span></p>
|
|
</p></li></ol>
|
|
<div class="section" id="EN-US_TOPIC_0000001134434168__section2706112181411"><a name="EN-US_TOPIC_0000001134434168__section2706112181411"></a><a name="section2706112181411"></a><h4 class="sectiontitle">Online Redistribution</h4><p id="EN-US_TOPIC_0000001134434168__p336124191612"><strong id="EN-US_TOPIC_0000001134434168__b12324235124117">Precautions</strong></p>
|
|
<p id="EN-US_TOPIC_0000001134434168__p15631715124312">In online redistribution mode, the database supports partial DDL and DCL operations.</p>
|
|
<ul id="EN-US_TOPIC_0000001134434168__ul9544163015212"><li id="EN-US_TOPIC_0000001134434168__la27ccd2b46984274912e6e15e0bdd764">Local tables that are being redistributed support insert, delete and update operations and some DDL operations:<ul id="EN-US_TOPIC_0000001134434168__u075e758259d14996a6bbbaa99b493a31"><li id="EN-US_TOPIC_0000001134434168__l5ebba28d593f415b8cd88171c91ec873"><strong id="EN-US_TOPIC_0000001134434168__b105321210135715">INSERT</strong>, <strong id="EN-US_TOPIC_0000001134434168__b11532111013572">DELETE</strong>, <strong id="EN-US_TOPIC_0000001134434168__b9532151055713">UPDATE</strong>, <strong id="EN-US_TOPIC_0000001134434168__b1153251020570">MERGE INTO</strong>, <strong id="EN-US_TOPIC_0000001134434168__b1679017189217">OVERWRITE</strong>, <strong id="EN-US_TOPIC_0000001134434168__b17167171021">UPSERT</strong></li><li id="EN-US_TOPIC_0000001134434168__en-us_topic_0085032684_li1366408804">Join queries across node groups</li><li id="EN-US_TOPIC_0000001134434168__l15deea8c003d4ab1a59ee97028d2b167"><strong id="EN-US_TOPIC_0000001134434168__b1560117586010">DROP</strong>, <strong id="EN-US_TOPIC_0000001134434168__b4602125812014">TRUNCATE</strong>, <strong id="EN-US_TOPIC_0000001134434168__b76022581608">TRUNCATE-PARTITION</strong></li></ul>
|
|
</li></ul>
|
|
<ul id="EN-US_TOPIC_0000001134434168__ul1658410112232"><li id="EN-US_TOPIC_0000001134434168__li209859974916">The following operations cannot be performed on tables that are being redistributed:<ul id="EN-US_TOPIC_0000001134434168__ul723316865117"><li id="EN-US_TOPIC_0000001134434168__li723348115111">Run <strong id="EN-US_TOPIC_0000001134434168__b1010351016318">ALTER TABLE</strong> statements (except for <strong id="EN-US_TOPIC_0000001134434168__b1610321010314">TRUNCATE PARTITION</strong>), including adding or deleting columns, renaming tables, and modifying schemas.</li><li id="EN-US_TOPIC_0000001134434168__li09239385527">Create, modify, or delete indexes.</li><li id="EN-US_TOPIC_0000001134434168__li88712558533">Run <strong id="EN-US_TOPIC_0000001134434168__b158066198413">VACUUM FULL</strong> or <strong id="EN-US_TOPIC_0000001134434168__b20806119648">CLUSTER</strong> on tables.</li><li id="EN-US_TOPIC_0000001134434168__li1441124125419">Modify the sequence objects on which a column depends, including creating and modifying them. Typical statements are <strong id="EN-US_TOPIC_0000001134434168__b49321220458">CREATE</strong> and <strong id="EN-US_TOPIC_0000001134434168__b159329201657">ALTER SEQUENCE ... OWNED BY</strong>.</li></ul>
|
|
</li></ul>
|
|
<p id="EN-US_TOPIC_0000001134434168__p17211103178"><strong id="EN-US_TOPIC_0000001134434168__b183282358410">Procedure</strong></p>
|
|
</div>
|
|
<ol id="EN-US_TOPIC_0000001134434168__ol101841229111418"><li id="EN-US_TOPIC_0000001134434168__li151848294143"><span>Log in to the GaussDB(DWS) management console.</span></li><li id="EN-US_TOPIC_0000001134434168__li318413298141"><span>Choose <span class="uicontrol" id="EN-US_TOPIC_0000001134434168__uicontrol398942720323"><b>Clusters</b></span>. All clusters are displayed by default.</span></li><li id="EN-US_TOPIC_0000001134434168__li018472991412"><span>In the <span class="parmname" id="EN-US_TOPIC_0000001134434168__parmname838615017818"><b>Operation</b></span> column of the target cluster, choose <span class="menucascade" id="EN-US_TOPIC_0000001134434168__menucascade2038718506820"><b><span class="uicontrol" id="EN-US_TOPIC_0000001134434168__uicontrol9387750284">More</span></b> > <b><span class="uicontrol" id="EN-US_TOPIC_0000001134434168__uicontrol1338717501583">Redistribute</span></b></span>, as shown in the following figure.</span><p><p id="EN-US_TOPIC_0000001134434168__p718515291142"></p>
|
|
<p id="EN-US_TOPIC_0000001134434168__p1080285132713"><span><img id="EN-US_TOPIC_0000001134434168__image117517375289" src="figure/en-us_image_0000001161787646.png" width="423.9375" height="214.48338100000004" title="Click to enlarge" class="imgResize"></span></p>
|
|
</p></li><li id="EN-US_TOPIC_0000001134434168__li218515299148"><span>On the <strong id="EN-US_TOPIC_0000001134434168__b1449221312812">Redistribute</strong> page that is displayed, set <strong id="EN-US_TOPIC_0000001134434168__b18492111342810">Advanced</strong> to <strong id="EN-US_TOPIC_0000001134434168__b0492111315280">Custom</strong>, set the redistribution mode to <strong id="EN-US_TOPIC_0000001134434168__b14492171362810">Online</strong>, and click <strong id="EN-US_TOPIC_0000001134434168__b10492151342815">Next: Confirm</strong> to submit the task.</span><p><p id="EN-US_TOPIC_0000001134434168__p1161193263017"><span><img id="EN-US_TOPIC_0000001134434168__image172223213016" src="figure/en-us_image_0000001207147903.png" width="421.303036" height="208.197136" title="Click to enlarge" class="imgResize"></span></p>
|
|
<p id="EN-US_TOPIC_0000001134434168__p555914963315"><span><img id="EN-US_TOPIC_0000001134434168__image1011261023312" src="figure/en-us_image_0000001161788458.png" width="418.77949400000006" height="208.197136" title="Click to enlarge" class="imgResize"></span></p>
|
|
<p id="EN-US_TOPIC_0000001134434168__p10743132264319"><span><img id="EN-US_TOPIC_0000001134434168__image1739119452439" src="figure/en-us_image_0000001159800492.png" width="412.96500000000003" height="138.079935" title="Click to enlarge" class="imgResize"></span></p>
|
|
</p></li></ol>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_01_0820.html">Cluster Redistribution</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |