forked from docs/doc-exports
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>
29 lines
10 KiB
HTML
29 lines
10 KiB
HTML
<a name="EN-US_TOPIC_0000001233883217"></a><a name="EN-US_TOPIC_0000001233883217"></a>
|
|
|
|
<h1 class="topictitle1">GDS Pipe FAQs</h1>
|
|
<div id="body1600851837006"><div class="section" id="EN-US_TOPIC_0000001233883217__section13470788507"><h4 class="sectiontitle">Precautions</h4><ul id="EN-US_TOPIC_0000001233883217__ul185711541507"><li id="EN-US_TOPIC_0000001233883217__li96811013164816">GDS supports concurrent import and export. The <strong id="EN-US_TOPIC_0000001233883217__b453734344416">gds -t</strong> parameter is used to set the size of the thread pool and control the maximum number of concurrent working threads. But it does not accelerate a single SQL task. The default value of <strong id="EN-US_TOPIC_0000001233883217__b17955544184417">gds -t</strong> is <strong id="EN-US_TOPIC_0000001233883217__b17955194419448">8</strong>, and the upper limit is <strong id="EN-US_TOPIC_0000001233883217__b149551444144411">200</strong>. When using the pipe function to import and export data, ensure that the value of <strong id="EN-US_TOPIC_0000001233883217__b1132574618445">-t</strong> is greater than or equal to the number of concurrent services. In the dual-cluster interconnection scenario, the value of <strong id="EN-US_TOPIC_0000001233883217__b15434847164412">-t</strong> must be greater than or equal to twice the number of concurrent services.</li><li id="EN-US_TOPIC_0000001233883217__li108571454105015">Data in pipes is deleted once read. Therefore, ensure that no other program except GDS reads data in the pipe during import or export. Otherwise, data may be lost, task errors may occur, or the exported files may be disordered.</li><li id="EN-US_TOPIC_0000001233883217__li385716546503">Concurrent import and export of foreign tables with the same location are not supported. That is, multiple threads of GDS cannot read or write pipe files at the same time.</li><li id="EN-US_TOPIC_0000001233883217__li5857354125019">A single import or export task of GDS identifies only one pipe. Therefore, do not carry wildcard characters ({}[]?) in the location address set for the GDS foreign table. Example:<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233883217__screen24031546125113"><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="k">CREATE</span><span class="w"> </span><span class="k">FOREIGN</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">foreign_test_pipe_tr</span><span class="p">(</span><span class="w"> </span><span class="k">like</span><span class="w"> </span><span class="n">test_pipe</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="n">SERVER</span><span class="w"> </span><span class="n">gsmpp_server</span><span class="w"> </span><span class="k">OPTIONS</span><span class="w"> </span><span class="p">(</span><span class="k">LOCATION</span><span class="w"> </span><span class="s1">'gsfs://192.168.0.1:7789/foreign_test_*'</span><span class="p">,</span><span class="w"> </span><span class="n">FORMAT</span><span class="w"> </span><span class="s1">'text'</span><span class="p">,</span><span class="w"> </span><span class="k">DELIMITER</span><span class="w"> </span><span class="s1">','</span><span class="p">,</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="s1">''</span><span class="p">,</span><span class="w"> </span><span class="n">EOL</span><span class="w"> </span><span class="s1">'0x0a'</span><span class="w"> </span><span class="p">,</span><span class="n">file_type</span><span class="w"> </span><span class="s1">'pipe'</span><span class="p">,</span><span class="n">auto_create_pipe</span><span class="w"> </span><span class="s1">'false'</span><span class="p">);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<ul id="EN-US_TOPIC_0000001233883217__ul351103115212"><li id="EN-US_TOPIC_0000001233883217__li18511632526">When the <strong id="EN-US_TOPIC_0000001233883217__b653011042119">-r</strong> recursion parameter is enabled for GDS, only one pipe can be identified. That is, GDS identifies only one pipe in the current data directory and does not recursively search for it. Therefore, the <strong id="EN-US_TOPIC_0000001233883217__b7536141012120">-r</strong> parameter does not take effect in the pipe import and export scenarios.</li><li id="EN-US_TOPIC_0000001233883217__li1151116325210">CN retry is not supported during the import and export through a pipe, because GDS cannot control the operations performed by peer users and programs on pipes.</li><li id="EN-US_TOPIC_0000001233883217__li1751183165218">During the import, if the peer program does not write data into the pipe for more than one hour, the import task times out and an error is reported.</li><li id="EN-US_TOPIC_0000001233883217__li1151115316523">During the export, if the peer program does not read data from the pipe for more than one hour by default, the export task times out and an error is reported.</li><li id="EN-US_TOPIC_0000001233883217__li12512832526">Ensure that the GDS version and kernel version support the function of importing and exporting data through pipes.</li><li id="EN-US_TOPIC_0000001233883217__li207182812225">If the <strong id="EN-US_TOPIC_0000001233883217__b12701919143111">auto_create_pipe parameter</strong> of the foreign table is set to <strong id="EN-US_TOPIC_0000001233883217__b1642132920215">true</strong>, a delay may occur when GDS automatically creates a pipe. Before any operation on a pipe, check whether the automatically created pipe exists and whether it is a pipe file.</li><li id="EN-US_TOPIC_0000001233883217__li11541213182517">Once an import or export task through a GDS pipe is complete, the pipe is automatically deleted. However, the pipe deletion is delayed, if you manually terminate an import or export task. In this situation, the pipe is deleted after the timeout interval expires.</li></ul>
|
|
<div class="section" id="EN-US_TOPIC_0000001233883217__section9713631531"><h4 class="sectiontitle">Common Troubleshooting Methods:</h4><ul id="EN-US_TOPIC_0000001233883217__ul1075213291434"><li id="EN-US_TOPIC_0000001233883217__li9752729134">Issue 1: <strong id="EN-US_TOPIC_0000001233883217__b199017564233">"/***/postgres_public_foreign_test_pipe_tr.pipe" must be named pipe.</strong><p id="EN-US_TOPIC_0000001233883217__p1797223119315">Locating method: The type of the GDS foreign table <strong id="EN-US_TOPIC_0000001233883217__b2856160192417">file_type</strong> is pipe, but the operated file is a common file. Check whether the <strong id="EN-US_TOPIC_0000001233883217__b104679442413">postgres_public_foreign_test_pipe_tr.pipe</strong> file is a pipe file.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233883217__li664810391239">Issue 2: <strong id="EN-US_TOPIC_0000001233883217__b51951564246">could not open pipe "/***/postgres_public_foreign_test_pipe_tw.pipe" cause by Permission denied</strong>.<p id="EN-US_TOPIC_0000001233883217__p15220929393">Locating method: GDS does not have the permission to open the pipe file.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233883217__li283418517311">Issue 3: <strong id="EN-US_TOPIC_0000001233883217__b1823189202416">could not open source file /*****/postgres_public_foreign_test_pipe_tw.pipe because timeout 300s for WRITING</strong>.<p id="EN-US_TOPIC_0000001233883217__p16486123811116">Locating method: Opening the pipe times out when GDS is used to export data. This is because the pipe is not created within 300 seconds after <strong id="EN-US_TOPIC_0000001233883217__b4149910162419">auto_create_pipe</strong> is set to <strong id="EN-US_TOPIC_0000001233883217__b131491110112413">false</strong>, or the pipe is created but is not read by any program within 300 seconds.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233883217__li1865212514416">Issue 4: <strong id="EN-US_TOPIC_0000001233883217__b610351114242">could not open source file /*****/postgres_public_foreign_test_pipe_tw.pipe because timeout 300s for READING</strong>.<p id="EN-US_TOPIC_0000001233883217__p569941111818">Locating method: Opening the pipe times out when GDS is used to export data. This is because the pipe is not created within 300 seconds after <strong id="EN-US_TOPIC_0000001233883217__b1715411252415">auto_create_pipe</strong> is set to <strong id="EN-US_TOPIC_0000001233883217__b171551212112418">false</strong>, or the pipe is created but is not written by any program within 300 seconds.</p>
|
|
</li></ul>
|
|
<ul id="EN-US_TOPIC_0000001233883217__ul1029216111416"><li id="EN-US_TOPIC_0000001233883217__li192921811246">Issue 5: <strong id="EN-US_TOPIC_0000001233883217__b573871314248">could not poll writing source pipe file "/****/postgres_public_foreign_test_pipe_tw.pipe" timeout 300s.</strong><p id="EN-US_TOPIC_0000001233883217__p15823122013315">Locating method: If the GDS does not receive any write event on the pipe within 300 seconds during data export, the pipe is not read for more than 300 seconds.</p>
|
|
</li></ul>
|
|
<ul id="EN-US_TOPIC_0000001233883217__ul1172814181747"><li id="EN-US_TOPIC_0000001233883217__li1772812181641">Issue 6: <strong id="EN-US_TOPIC_0000001233883217__b033911163241">could not poll reading source pipe file "/****/postgres_public_foreign_test_pipe_tw.pipe" timeout 300s.</strong><p id="EN-US_TOPIC_0000001233883217__p78811552399">Locating method: If the GDS does not receive any read event on the pipe within 300 seconds during data import, the pipe is not written for more than 300 seconds.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233883217__li123022953810">Issue 7: <strong id="EN-US_TOPIC_0000001233883217__b11782172612246">could not open pipe file "/***/postgres_public_foreign_test_pipe_tw.pipe" for "WRITING" with error No such device or address</strong>.<p id="EN-US_TOPIC_0000001233883217__p14823110111919">Locating method: It indicates that the <strong id="EN-US_TOPIC_0000001233883217__b19756102762411">/***/postgres_public_foreign_test_pipe_tw.pipe</strong> file is not read by any program. As a result, GDS cannot open the pipe file by writing.</p>
|
|
</li></ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0988.html">Other Operations</a></div>
|
|
</div>
|
|
</div>
|
|
|