<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Michael</title>
    <description>The latest articles on Forem by Michael (@michaelfv).</description>
    <link>https://forem.com/michaelfv</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3830930%2F34d5c2f8-f162-4df3-865b-34a96a64ac17.png</url>
      <title>Forem: Michael</title>
      <link>https://forem.com/michaelfv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/michaelfv"/>
    <language>en</language>
    <item>
      <title>Modifying Cluster Parameters in GBase 8a: Instant vs. Permanent</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Sun, 17 May 2026 14:46:00 +0000</pubDate>
      <link>https://forem.com/michaelfv/modifying-cluster-parameters-in-gbase-8a-instant-vs-permanent-27m0</link>
      <guid>https://forem.com/michaelfv/modifying-cluster-parameters-in-gbase-8a-instant-vs-permanent-27m0</guid>
      <description>&lt;p&gt;Changing system parameters like &lt;code&gt;gcluster_rebalancing_concurrent_count&lt;/code&gt; in GBase 8a can be done in two ways — one gives you instant effect with a catch, the other is permanent but requires a restart. Here's how both work in a &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two Approaches at a Glance
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;How&lt;/th&gt;
&lt;th&gt;When It Takes Effect&lt;/th&gt;
&lt;th&gt;Persistence&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Config file&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Edit &lt;code&gt;.cnf&lt;/code&gt; / &lt;code&gt;.conf&lt;/code&gt; files&lt;/td&gt;
&lt;td&gt;After restarting the module&lt;/td&gt;
&lt;td&gt;Permanent&lt;/td&gt;
&lt;td&gt;All parameters, especially read-only ones&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SET GLOBAL&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SET GLOBAL param = value;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;New sessions immediately&lt;/td&gt;
&lt;td&gt;Lost on restart&lt;/td&gt;
&lt;td&gt;Dynamic, tuneable parameters&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SET SESSION&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SET [SESSION] param = value;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Current session only&lt;/td&gt;
&lt;td&gt;Session ends&lt;/td&gt;
&lt;td&gt;Debugging or one-off queries&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Example: Adjusting Rebalance Concurrency
&lt;/h2&gt;

&lt;p&gt;The parameter &lt;code&gt;gcluster_rebalancing_concurrent_count&lt;/code&gt; controls how many tables can be rebalanced in parallel. It's a performance tuning knob that supports dynamic change.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 1: SET GLOBAL (Immediate, for Quick Tuning)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="k"&gt;GLOBAL&lt;/span&gt; &lt;span class="n"&gt;gcluster_rebalancing_concurrent_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;-- Verify in a new session&lt;/span&gt;
&lt;span class="k"&gt;SHOW&lt;/span&gt; &lt;span class="k"&gt;GLOBAL&lt;/span&gt; &lt;span class="n"&gt;VARIABLES&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'gcluster_rebalancing_concurrent_count'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;New rebalance tasks will use the updated count instantly. Already running tasks are unaffected.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 2: Config File (Permanent)
&lt;/h3&gt;

&lt;p&gt;Edit the gcluster config file at &lt;code&gt;$GCLUSTER_BASE/config/gbase_8a_gcluster.cnf&lt;/code&gt;, find or add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="py"&gt;gcluster_rebalancing_concurrent_count&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then restart the module:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcluster_services gcluster restart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After restart, this value becomes the new default. Any &lt;code&gt;SET GLOBAL&lt;/code&gt; changes made before the restart will be replaced by the config file value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Points
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read‑only parameters&lt;/strong&gt; (e.g., security settings) can only be changed in config files and require a restart.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parameter prefixes tell you which file to edit&lt;/strong&gt;: &lt;code&gt;gcluster_&lt;/code&gt; → &lt;code&gt;gbase_8a_gcluster.cnf&lt;/code&gt;, &lt;code&gt;gbase_&lt;/code&gt; → &lt;code&gt;gbase_8a_gbase.cnf&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Always verify&lt;/strong&gt; with &lt;code&gt;SHOW GLOBAL VARIABLES&lt;/code&gt; and &lt;code&gt;SHOW VARIABLES&lt;/code&gt; to confirm the effective value at global and session levels.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Recommended Workflow
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Online tuning, instant effect&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SET GLOBAL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No restart, quick validation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Make permanent, standardize config&lt;/td&gt;
&lt;td&gt;Config file + restart&lt;/td&gt;
&lt;td&gt;Survives restarts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Temporary debug&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SET SESSION&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Minimal scope, safe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read‑only parameter change&lt;/td&gt;
&lt;td&gt;Config file + restart&lt;/td&gt;
&lt;td&gt;Only option&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For performance parameters, the best practice is: &lt;strong&gt;test with &lt;code&gt;SET GLOBAL&lt;/code&gt; first, then persist the winning value in the config file, and restart during a maintenance window to make it stick&lt;/strong&gt;. This gives you both agility and long‑term stability in your &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>operations</category>
    </item>
    <item>
      <title>How to Troubleshoot Performance Degradation in GBase 8a</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Sun, 17 May 2026 13:40:00 +0000</pubDate>
      <link>https://forem.com/michaelfv/how-to-troubleshoot-performance-degradation-in-gbase-8a-g50</link>
      <guid>https://forem.com/michaelfv/how-to-troubleshoot-performance-degradation-in-gbase-8a-g50</guid>
      <description>&lt;p&gt;When queries start slowing down in your &lt;strong&gt;gbase database&lt;/strong&gt; cluster, a structured approach helps identify the root cause quickly. Work through these six areas, from cluster health to deep log analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Check Overall Cluster Health
&lt;/h2&gt;

&lt;p&gt;Start with the cluster status command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcadmin showcluster vc &amp;lt;vc_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CLUSTER STATE&lt;/strong&gt; must be &lt;code&gt;ACTIVE&lt;/code&gt;. If not, the metadata service (GCware) is likely having issues and the cluster may be locked.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VIRTUAL CLUSTER MODE&lt;/strong&gt; should be &lt;code&gt;NORMAL&lt;/code&gt;. If it's &lt;code&gt;READONLY&lt;/code&gt; or &lt;code&gt;RECOVERY&lt;/code&gt;, slow performance is expected.&lt;/li&gt;
&lt;li&gt;Confirm that &lt;code&gt;gbased&lt;/code&gt;, &lt;code&gt;gcluster&lt;/code&gt;, and &lt;code&gt;syncserver&lt;/code&gt; on each node show &lt;code&gt;OPEN&lt;/code&gt;. A &lt;code&gt;CLOSE&lt;/code&gt; or &lt;code&gt;OFFLINE&lt;/code&gt; status means the node is out of service, shifting load to the remaining nodes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 2: Analyze Resource Usage and Contention
&lt;/h2&gt;

&lt;p&gt;Resource contention is the most frequent cause of sudden performance drops in a &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check resource pool load&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;  &lt;span class="k"&gt;SHOW&lt;/span&gt; &lt;span class="n"&gt;RESOURCE&lt;/span&gt; &lt;span class="n"&gt;POOL&lt;/span&gt; &lt;span class="k"&gt;USAGE&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;COORDINATORS&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;vc_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'&amp;lt;vc_name&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Watch for &lt;code&gt;cpu_usage_percent&lt;/code&gt; near &lt;strong&gt;100%&lt;/strong&gt;, &lt;code&gt;active_task&lt;/code&gt; hitting the &lt;code&gt;max_activetask&lt;/code&gt; limit, and &lt;code&gt;mem_usage_mb&lt;/code&gt; close to &lt;code&gt;max_memory&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Look for rejected or queued tasks&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;  &lt;span class="k"&gt;SHOW&lt;/span&gt; &lt;span class="n"&gt;RESOURCE&lt;/span&gt; &lt;span class="n"&gt;POOL&lt;/span&gt; &lt;span class="n"&gt;EVENTS&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;vc_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'&amp;lt;vc_name&amp;gt;'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;event_time&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;DATE_SUB&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;NOW&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;INTERVAL&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;HOUR&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A spike in &lt;code&gt;WAITING&lt;/code&gt; or &lt;code&gt;REJECTED&lt;/code&gt; events proves resource contention.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;System-level metrics&lt;/strong&gt;: SSH into nodes and use &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;free -m&lt;/code&gt;, &lt;code&gt;iostat&lt;/code&gt; to check CPU, memory, and disk I/O. Pay special attention to swap usage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 3: Find the Slow Queries
&lt;/h2&gt;

&lt;p&gt;A single heavy query can impact the whole cluster.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use GDOM’s “Slow SQL” feature if available.&lt;/li&gt;
&lt;li&gt;Identify long-running queries currently executing:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;  &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;information_schema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;processlist&lt;/span&gt; 
  &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;COMMAND&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'EXECUTING'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="nb"&gt;TIME&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; 
  &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="nb"&gt;TIME&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt; &lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the &lt;code&gt;STATE&lt;/code&gt; column (e.g., &lt;code&gt;Sending data&lt;/code&gt;, &lt;code&gt;Sorting result&lt;/code&gt;) and the SQL text in &lt;code&gt;INFO&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inspect slow query logs at &lt;code&gt;$GCLUSTER_HOME/log/gcluster/express.log&lt;/code&gt; and &lt;code&gt;$GBASE_HOME/gnode/log/gbase/express.log&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Check for lock contention:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  gcadmin showlock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for locks held for an unusually long time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Examine Data Distribution and Storage
&lt;/h2&gt;

&lt;p&gt;Storage-level issues can degrade performance significantly.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data skew&lt;/strong&gt; causes uneven load across nodes.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;  &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;table_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;node_ip&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;segment_size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
  &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;information_schema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cluster_table_segments&lt;/span&gt; 
  &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;table_schema&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'&amp;lt;db_name&amp;gt;'&lt;/span&gt; 
  &lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;table_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;node_ip&lt;/span&gt; 
  &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;segment_size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If one node holds a disproportionately large amount of data, adjust the distribution key.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Disk usage&lt;/strong&gt;: Disk usage above &lt;strong&gt;80%&lt;/strong&gt; severely impacts performance.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; /opt/gbase
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Table fragmentation&lt;/strong&gt;: Frequent inserts/deletes can cause fragmentation. Check through GDOM health reports or system tables.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 5: Inspect Network and Hardware
&lt;/h2&gt;

&lt;p&gt;Infrastructure problems can mimic database performance issues.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test latency and bandwidth between nodes with &lt;code&gt;ping&lt;/code&gt; and &lt;code&gt;iperf3&lt;/code&gt;. An abnormal increase in &lt;code&gt;sync.log&lt;/code&gt; size often hints at network trouble.&lt;/li&gt;
&lt;li&gt;Check server hardware logs (RAID controllers, disk SMART). Frequent core dumps may indicate unstable hardware:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lrt&lt;/span&gt; /opt/gbase/gcluster/userdata/gcluster/core.&lt;span class="k"&gt;*&lt;/span&gt; 2&amp;gt;/dev/null
  &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lrt&lt;/span&gt; /opt/gbase/gnode/userdata/gbase/&lt;span class="k"&gt;*&lt;/span&gt;.dump 2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 6: Dig Into Logs and Configuration
&lt;/h2&gt;

&lt;p&gt;When the above steps don't pinpoint the issue, logs are your best friend.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check &lt;code&gt;system.log&lt;/code&gt; (service starts/stops, critical errors) and &lt;code&gt;gcware.log&lt;/code&gt; (metadata operations). Search for &lt;code&gt;ERROR&lt;/code&gt;, &lt;code&gt;WARNING&lt;/code&gt;, &lt;code&gt;timeout&lt;/code&gt;, &lt;code&gt;slow&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Verify that key performance parameters haven't been changed recently, such as &lt;code&gt;gbase_parallel_degree&lt;/code&gt; and memory settings like &lt;code&gt;gbase_heap_*&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Reference Checklist
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;Key Command/Method&lt;/th&gt;
&lt;th&gt;Likely Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cluster state&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcadmin showcluster&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Restore GCware if not &lt;code&gt;ACTIVE&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resource contention&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SHOW RESOURCE POOL USAGE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adjust resource plans or scale out&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Slow queries&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;processlist&lt;/code&gt;, &lt;code&gt;express.log&lt;/code&gt;, GDOM&lt;/td&gt;
&lt;td&gt;Optimize SQL, add indexes, adjust distribution keys&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lock contention&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcadmin showlock&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Tune transactions, avoid long locks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data skew&lt;/td&gt;
&lt;td&gt;&lt;code&gt;cluster_table_segments&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Rebuild table or change distribution column&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disk space&lt;/td&gt;
&lt;td&gt;&lt;code&gt;df -h&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Clean logs/data, expand storage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Network/hardware&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ping&lt;/code&gt;, &lt;code&gt;iostat&lt;/code&gt;, core dumps&lt;/td&gt;
&lt;td&gt;Engage sysadmin&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A solid performance baseline combined with regular monitoring makes troubleshooting far easier. When performance deviates, use this structured approach to quickly bring your &lt;strong&gt;gbase database&lt;/strong&gt; back to full speed.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>operations</category>
    </item>
    <item>
      <title>Using the table.list File for Flexible Backup in GBase 8a</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Sun, 17 May 2026 12:33:00 +0000</pubDate>
      <link>https://forem.com/michaelfv/using-the-tablelist-file-for-flexible-backup-in-gbase-8a-4n3n</link>
      <guid>https://forem.com/michaelfv/using-the-tablelist-file-for-flexible-backup-in-gbase-8a-4n3n</guid>
      <description>&lt;p&gt;When backing up specific tables across different databases in GBase 8a, you'll need a &lt;code&gt;table.list&lt;/code&gt; file. This file is only required for &lt;strong&gt;batch table‑level backups&lt;/strong&gt; — not for entire VCs or databases. Here's how to use it in your &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When You Need table.list
&lt;/h2&gt;

&lt;p&gt;The file is mandatory only for the &lt;code&gt;backup tables&lt;/code&gt; command. Other backup levels do not use it:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Backup Level&lt;/th&gt;
&lt;th&gt;Command (inside gcrcman)&lt;/th&gt;
&lt;th&gt;Requires table.list?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cluster‑level&lt;/td&gt;
&lt;td&gt;&lt;code&gt;backup level 0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database‑level&lt;/td&gt;
&lt;td&gt;&lt;code&gt;backup database vc1.testdb level 0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Single table&lt;/td&gt;
&lt;td&gt;&lt;code&gt;backup table vc1.testdb.t1 level 0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Batch tables&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;backup tables /opt/gbase/table.list level 0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So, if you need to selectively back up a set of tables that may span multiple databases or even multiple VCs, &lt;code&gt;table.list&lt;/code&gt; is the tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a File Is Required
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Explicit scope&lt;/strong&gt;: Without a database boundary, the file removes any ambiguity about which tables are included.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross‑database and cross‑VC support&lt;/strong&gt;: The file can list tables from different databases and VCs, which a single &lt;code&gt;backup database&lt;/code&gt; command cannot do.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scripting and automation&lt;/strong&gt;: Maintaining a list of tables in a file makes it easy to version, modify, and run repeatable backups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Atomicity and consistency&lt;/strong&gt;: The whole &lt;code&gt;backup tables&lt;/code&gt; job runs as one task; the file defines the complete dataset, helping to achieve a consistent point‑in‑time view.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  table.list File Format
&lt;/h2&gt;

&lt;p&gt;Strict rules apply:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One table per line&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full table name format&lt;/strong&gt;: &lt;code&gt;[vcname.]dbname.tabname&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vcname&lt;/code&gt;: Virtual Cluster name (optional if using the default VC).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;dbname&lt;/code&gt;: Database name.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tabname&lt;/code&gt;: Table name.&lt;/li&gt;
&lt;li&gt;Components are separated by a dot &lt;code&gt;.&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Example content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vc000001.test.t1
vc000001.test.t2
vc000001.test.t3
sales.customer_order   -- uses default VC
hr.employee_salary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Example: Back Up Three Tables
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create the file&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   vi /opt/gbase/backup/table.list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   vc1.test.t1
   vc1.test.t2
   vc1.test.t3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run the backup&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   gcrcman.py &lt;span class="nt"&gt;-d&lt;/span&gt; /opt/gbase/backup &lt;span class="nt"&gt;-P&lt;/span&gt; gbase &lt;span class="nt"&gt;-p&lt;/span&gt; your_password
   gcrcman&amp;gt; backup tables /opt/gbase/backup/table.list level 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Key Points
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;File location&lt;/strong&gt;: The &lt;code&gt;table.list&lt;/code&gt; file must reside on the management node running &lt;code&gt;gcrcman&lt;/code&gt; and be readable by the executing user.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation&lt;/strong&gt;: If a listed table doesn't exist or the format is incorrect, the backup will fail.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restore&lt;/strong&gt;: You restore with the corresponding backup set, not the file itself. The restore command is &lt;code&gt;recover tables ...&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate automatically&lt;/strong&gt;: You can create &lt;code&gt;table.list&lt;/code&gt; from system tables:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;  &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;CONCAT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;table_vc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'.'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;table_schema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'.'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;table_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;information_schema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tables&lt;/span&gt;
  &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;table_schema&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'test'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'sales'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;OUTFILE&lt;/span&gt; &lt;span class="s1"&gt;'/tmp/table.list'&lt;/span&gt;
  &lt;span class="n"&gt;FIELDS&lt;/span&gt; &lt;span class="n"&gt;TERMINATED&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt; &lt;span class="n"&gt;LINES&lt;/span&gt; &lt;span class="n"&gt;TERMINATED&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;table.list&lt;/code&gt; file gives you precise control over multi‑table backups in GBASE's MPP cluster. Use it when you need to go beyond single‑database backups and tailor your data protection exactly to your needs.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>backup</category>
    </item>
    <item>
      <title>Safe Node Removal vs. Failed Node Replacement in GBase 8a</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Sun, 17 May 2026 11:28:17 +0000</pubDate>
      <link>https://forem.com/michaelfv/safe-node-removal-vs-failed-node-replacement-in-gbase-8a-5gjp</link>
      <guid>https://forem.com/michaelfv/safe-node-removal-vs-failed-node-replacement-in-gbase-8a-5gjp</guid>
      <description>&lt;p&gt;Shrinking a cluster and replacing a failed node are two fundamental operations in GBase 8a. Both follow a “data safety first” principle, but they differ in goals, procedures, and risk profiles. Here’s how to execute each safely in your &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Safely Remove a Node (Scale In)
&lt;/h2&gt;

&lt;p&gt;The goal is to permanently reduce the cluster size. The rule: &lt;strong&gt;move all data off the node first, then remove it&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a new Distribution&lt;/strong&gt;: Edit &lt;code&gt;gcChangeInfo.xml&lt;/code&gt; to list only the nodes you want to keep, run &lt;code&gt;gcadmin distribution&lt;/code&gt; to build the new map, and execute &lt;code&gt;initnodedatamap&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run REBALANCE&lt;/strong&gt;: Migrate data from the old Distribution to the new one. Monitor progress until it reaches 100%:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;   &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;gclusterdb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rebalancing_status&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clean up the old Distribution&lt;/strong&gt;: Drop the old hashmap and Distribution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove the node from the cluster&lt;/strong&gt;: Edit &lt;code&gt;gcChangeInfo.xml&lt;/code&gt; again, this time listing only the departing node’s IP, then execute &lt;code&gt;gcadmin rmnodes&lt;/code&gt; to turn it into a Free Node.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(Optional) Uninstall the software completely&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How to Replace a Failed Node
&lt;/h2&gt;

&lt;p&gt;The goal is to maintain the same cluster size while swapping out faulty hardware. There are two modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mode A&lt;/strong&gt;: Replace with a Freenode (old and new IPs differ).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mode B&lt;/strong&gt;: Replace with a brand‑new node (IP must match the old one).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Key steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Isolate the failed node&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   gcadmin setnodestate &amp;lt;failed_IP&amp;gt; unavailable
   gcadmin rmfeventlog &amp;lt;failed_IP&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a transitional Distribution and move data off&lt;/strong&gt;: Build a Distribution that excludes the failed node, then rebalance so data remains fully replicated elsewhere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execute the replacement command&lt;/strong&gt; (unique to this operation):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ./replace.py &lt;span class="nt"&gt;--host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;failed_IP&amp;gt; &lt;span class="nt"&gt;--freenode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;new_IP&amp;gt; &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;data &lt;span class="nt"&gt;--vcname&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;vc1 &lt;span class="nt"&gt;--dbaUser&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;gbase &lt;span class="nt"&gt;--overwrite&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The new node joins and a fresh Distribution is generated automatically.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Second REBALANCE and cleanup&lt;/strong&gt;: Rebalance again to bring data back onto the new node, then drop the transitional Distribution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove the old node&lt;/strong&gt;: Now empty, it can be safely deleted.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Comparison at a Glance
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Remove Node (Scale In)&lt;/th&gt;
&lt;th&gt;Replace Failed Node&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Goal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fewer nodes, free resources&lt;/td&gt;
&lt;td&gt;Same node count, new hardware&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data flow&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;One‑way: off the departing node&lt;/td&gt;
&lt;td&gt;Two‑way: off the failed node, back onto the new one&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;New node required?&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Key commands&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;gcadmin distribution&lt;/code&gt;, &lt;code&gt;rebalance&lt;/code&gt;, &lt;code&gt;gcadmin rmnodes&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;gcadmin setnodestate&lt;/code&gt;, &lt;code&gt;replace.py&lt;/code&gt;, &lt;code&gt;rebalance&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Distribution changes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;One new Distribution (excluding removed node)&lt;/td&gt;
&lt;td&gt;Two: transitional (excluding failed node) and final (including new node)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;REBALANCE count&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;At least 2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Node state management&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Usually direct&lt;/td&gt;
&lt;td&gt;Must set to &lt;code&gt;UNAVAILABLE&lt;/code&gt; first&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Risk level&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Performance impact during migration&lt;/td&gt;
&lt;td&gt;Higher — involves state transitions and potential inconsistency&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Golden Rules
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Always back up first&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor continuously&lt;/strong&gt; — watch &lt;code&gt;rebalancing_status&lt;/code&gt; and cluster health.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow the sequence&lt;/strong&gt; — especially for replacement: isolate → move off → replace → move back → clean up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schedule during off‑peak hours&lt;/strong&gt; — both operations generate heavy I/O and network traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mind the IPs&lt;/strong&gt; — when using a Freenode the IP changes, so update connection configs or DNS accordingly. With a brand‑new node, the IP must remain identical.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Knowing whether you’re “slimming down” or “swapping parts” lets you pick the right playbook and execute node changes safely in your &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>rebalance</category>
    </item>
    <item>
      <title>When and Why to Run REBALANCE in GBase 8a</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Sat, 16 May 2026 15:44:00 +0000</pubDate>
      <link>https://forem.com/michaelfv/when-and-why-to-run-rebalance-in-gbase-8a-1n2a</link>
      <guid>https://forem.com/michaelfv/when-and-why-to-run-rebalance-in-gbase-8a-1n2a</guid>
      <description>&lt;p&gt;The &lt;code&gt;REBALANCE&lt;/code&gt; command moves table data from an old distribution map to a new one, aligning physical storage with the latest data layout plan. Beyond fixing uneven data spread, any operation that changes the Distribution requires a manual REBALANCE in your &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Core Purpose of REBALANCE
&lt;/h2&gt;

&lt;p&gt;REBALANCE doesn't simply "balance data" — it migrates data to match a new Distribution. Here's the logic:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The cluster's data layout is defined by a Distribution (mapping of segments, nodes, and replicas).&lt;/li&gt;
&lt;li&gt;When the Distribution changes (e.g., nodes added or removed), old and new Distributions coexist.&lt;/li&gt;
&lt;li&gt;Table data remains tied to the old Distribution.&lt;/li&gt;
&lt;li&gt;REBALANCE moves the data from the old Distribution's mapping to the new one, physically relocating rows.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Four Scenarios That Require a Manual REBALANCE
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Scaling the Cluster (Adding or Removing Nodes)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Adding Data Nodes&lt;/strong&gt;: Create a new Distribution that includes the new nodes, then REBALANCE shifts a portion of data onto them, rebalancing storage and compute load.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Removing Data Nodes&lt;/strong&gt;: Create a Distribution that excludes the nodes to be removed, then REBALANCE moves all their data to the remaining nodes before the nodes can be safely taken out.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Node Replacement (Failure Recovery)
&lt;/h3&gt;

&lt;p&gt;When replacing a failed data node, two REBALANCE operations are needed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;First REBALANCE&lt;/strong&gt;: Create a transitional Distribution without the failed node to move its data elsewhere, preserving data completeness.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Second REBALANCE&lt;/strong&gt;: After the replacement node joins, create a final Distribution that includes the new node and move data back, restoring the original replica layout and high availability.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  3. Resource Transfer Between Virtual Clusters (VCs)
&lt;/h3&gt;

&lt;p&gt;When moving node resources between two VCs, REBALANCE is required on both sides:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;On VC1, shrink by creating a Distribution without the departing node, REBALANCE data out, then remove the node.&lt;/li&gt;
&lt;li&gt;Join the node to VC2.&lt;/li&gt;
&lt;li&gt;On VC2, expand by creating a Distribution that includes the new node, REBALANCE data in.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  4. Changing Distribution Pattern or Fragment Parameters
&lt;/h3&gt;

&lt;p&gt;If you need to change the distribution pattern (e.g., Pattern 1 → Pattern 2) or adjust fragment parameters (e.g., increasing replicas from 1 to 2), a new Distribution must be created and REBALANCE triggered to reorganize data under the new rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  When REBALANCE Is NOT Needed
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Altering table structure (&lt;code&gt;ALTER TABLE ADD COLUMN&lt;/code&gt;) — no physical data movement.&lt;/li&gt;
&lt;li&gt;Routine DML (&lt;code&gt;INSERT&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;) — handled within the current Distribution.&lt;/li&gt;
&lt;li&gt;Coordinator node scaling — affects metadata only, not user data placement.&lt;/li&gt;
&lt;li&gt;Service restart without hardware change — Distribution remains unchanged.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  REBALANCE Scenarios at a Glance
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Trigger&lt;/th&gt;
&lt;th&gt;Prerequisite&lt;/th&gt;
&lt;th&gt;Goal&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scale Up&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;More nodes&lt;/td&gt;
&lt;td&gt;Create Distribution including new nodes&lt;/td&gt;
&lt;td&gt;Move data onto new nodes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scale Down&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fewer nodes&lt;/td&gt;
&lt;td&gt;Create Distribution excluding departing nodes&lt;/td&gt;
&lt;td&gt;Move data off departing nodes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Node Replacement&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Hardware change&lt;/td&gt;
&lt;td&gt;Create transitional Distribution without failed node&lt;/td&gt;
&lt;td&gt;Move out, replace, move back&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Resource Transfer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Node changes VC&lt;/td&gt;
&lt;td&gt;Create old/new Distributions on source and target VCs&lt;/td&gt;
&lt;td&gt;Migrate data between VCs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Policy Change&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pattern/replica change&lt;/td&gt;
&lt;td&gt;Create Distribution with new parameters&lt;/td&gt;
&lt;td&gt;Reorganize data under new rules&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;REBALANCE is the core command for online data reorganization in GBASE's MPP cluster. Any operational change that alters the node‑to‑segment mapping is, at heart, a Distribution change — and must be followed by a REBALANCE to synchronize the physical data. It is always triggered after a new Distribution is created and initialized, and before the old one is dropped. Mastering this command is essential for elastic scaling and advanced operations in a &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>operations</category>
    </item>
    <item>
      <title>GBase 8a Cluster Modes: NORMAL, READONLY, and RECOVERY Explained</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Sat, 16 May 2026 14:46:00 +0000</pubDate>
      <link>https://forem.com/michaelfv/gbase-8a-cluster-modes-normal-readonly-and-recovery-explained-1a6d</link>
      <guid>https://forem.com/michaelfv/gbase-8a-cluster-modes-normal-readonly-and-recovery-explained-1a6d</guid>
      <description>&lt;p&gt;GBase 8a MPP Cluster provides three operating modes that control what SQL operations are allowed: &lt;strong&gt;NORMAL&lt;/strong&gt;, &lt;strong&gt;READONLY&lt;/strong&gt;, and &lt;strong&gt;RECOVERY&lt;/strong&gt;. Administrators switch between them manually to match the current operational need — from everyday production to maintenance windows and disaster recovery.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Three Modes at a Glance
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Allowed SQL&lt;/th&gt;
&lt;th&gt;Forbidden SQL&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;NORMAL&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Everything: SELECT, DML, DDL, LOAD DATA&lt;/td&gt;
&lt;td&gt;Nothing&lt;/td&gt;
&lt;td&gt;Day‑to‑day production with full read/write capability.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;READONLY&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;SELECT queries only&lt;/td&gt;
&lt;td&gt;All writes: DML, DDL, LOAD DATA&lt;/td&gt;
&lt;td&gt;Safe maintenance window — freezes data while keeping queries running.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RECOVERY&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Nothing (not even SELECT)&lt;/td&gt;
&lt;td&gt;Everything&lt;/td&gt;
&lt;td&gt;Extreme data protection during restore or critical repair.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  When to Use Each Mode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  NORMAL: Default Production Mode
&lt;/h3&gt;

&lt;p&gt;The cluster serves all reads and writes. Major maintenance that could affect consistency or availability should not be performed in this mode.&lt;/p&gt;

&lt;h3&gt;
  
  
  READONLY: Standard Maintenance &amp;amp; Change Window
&lt;/h3&gt;

&lt;p&gt;This is the go‑to mode for planned operations — effectively a "maintenance mode". Use it for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scaling up/down&lt;/strong&gt;: Prevents concurrent writes during data redistribution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Node replacement&lt;/strong&gt;: The cluster can automatically or manually enter read‑only mode when swapping a failed node.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backups&lt;/strong&gt;: Ensures a consistent data view for logical backups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Major application releases&lt;/strong&gt;: Briefly freeze data while deploying.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  RECOVERY: High‑Risk Repair Mode
&lt;/h3&gt;

&lt;p&gt;Reserved for specific recovery scenarios and used only by senior administrators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Restoring a cluster or VC from backups.&lt;/li&gt;
&lt;li&gt;Disaster recovery drills.&lt;/li&gt;
&lt;li&gt;Fixing severe logical corruption by importing external repair data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All connections and queries are rejected in this mode — business is completely interrupted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Viewing and Switching Modes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Check the Current Mode
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcadmin showcluster vc vc1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for the &lt;code&gt;VIRTUAL CLUSTER MODE&lt;/code&gt; field in the output.&lt;/p&gt;

&lt;h3&gt;
  
  
  Switch Modes Manually
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Set the entire cluster to read‑only&lt;/span&gt;
gcadmin switchmode &lt;span class="nb"&gt;readonly&lt;/span&gt;

&lt;span class="c"&gt;# Set a specific VC to recovery mode&lt;/span&gt;
gcadmin switchmode recovery vc vc1

&lt;span class="c"&gt;# Return to normal mode&lt;/span&gt;
gcadmin switchmode normal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Best Practices
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Frequency&lt;/th&gt;
&lt;th&gt;Business Impact&lt;/th&gt;
&lt;th&gt;Rule of Thumb&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;NORMAL&lt;/td&gt;
&lt;td&gt;Always on&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;Production runs with full features.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;READONLY&lt;/td&gt;
&lt;td&gt;Often (maintenance)&lt;/td&gt;
&lt;td&gt;Queries unaffected; writes paused&lt;/td&gt;
&lt;td&gt;Switch to read‑only before any change.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RECOVERY&lt;/td&gt;
&lt;td&gt;Rarely&lt;/td&gt;
&lt;td&gt;Full outage&lt;/td&gt;
&lt;td&gt;Use recovery only at the foundation level.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Always switch to &lt;code&gt;READONLY&lt;/code&gt; before planned maintenance such as node changes or backups.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;RECOVERY&lt;/code&gt; mode is an "operating room" — notify stakeholders and have a rollback plan.&lt;/li&gt;
&lt;li&gt;Mode switches are fast, but schedule them during off‑peak hours when possible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using these three modes wisely keeps your &lt;strong&gt;gbase database&lt;/strong&gt; safe and your maintenance operations smooth. It's a simple but powerful part of the GBASE cluster management toolkit.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>operations</category>
    </item>
    <item>
      <title>How GBase 8a Detects and Responds to a GNode Process Crash</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Sat, 16 May 2026 13:46:00 +0000</pubDate>
      <link>https://forem.com/michaelfv/how-gbase-8a-detects-and-responds-to-a-gnode-process-crash-5dic</link>
      <guid>https://forem.com/michaelfv/how-gbase-8a-detects-and-responds-to-a-gnode-process-crash-5dic</guid>
      <description>&lt;p&gt;When a data node (gnode) process exits unexpectedly, GBase 8a's multi‑layer monitoring kicks in automatically. The cluster will try to restart the service, isolate the failed node, switch traffic away, and later resync the data — all without human intervention in most cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Faults Are Detected
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Process‑level monitoring (GCMonit)&lt;/strong&gt; runs on every node, watching core processes like &lt;code&gt;gbased&lt;/code&gt; and &lt;code&gt;syncserver&lt;/code&gt;. The moment a process dies, GCMonit attempts an automatic restart according to its configuration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cluster‑level heartbeat (GCware)&lt;/strong&gt; tracks every GNode's heartbeat. If heartbeats time out or stop, GCware marks the node's service state as &lt;code&gt;CLOSE&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Automated Response Sequence
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Automatic restart&lt;/strong&gt; — GCMonit tries to relaunch the &lt;code&gt;gbased&lt;/code&gt; process immediately. This first line of defense recovers from transient issues like memory spikes.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Service isolation and traffic redirection&lt;/strong&gt; — If the restart fails, or GCware declares the node dead first, GCware sets the node status to &lt;code&gt;CLOSE&lt;/code&gt; and notifies the GCluster coordinator. New queries are then routed exclusively to healthy nodes that hold replicas of the failed node's data. This switch is transparent to applications.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Data consistency repair&lt;/strong&gt; — Once the node comes back (either via auto‑restart or manual recovery), GCware logs inconsistency events (DML_EVENT / DDL_EVENT). The GCrecover process picks up these events and triggers SyncServer to copy fresh data from healthy replicas to the recovered node until it is fully consistent.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  When Manual Intervention Is Needed
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The monitoring process itself (GCMonit or gcware_monit) crashes, breaking the auto‑restart chain.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;gbased&lt;/code&gt; process fails to start repeatedly due to misconfiguration, disk full, or memory exhaustion.&lt;/li&gt;
&lt;li&gt;A majority of GCware nodes fail, locking the cluster and disabling automated recovery.&lt;/li&gt;
&lt;li&gt;Routine checks reveal a node stuck in &lt;code&gt;CLOSE&lt;/code&gt; or a process permanently &lt;code&gt;DOWN&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Common manual commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check cluster and node status&lt;/span&gt;
gcadmin showcluster vc &amp;lt;vc_name&amp;gt;

&lt;span class="c"&gt;# Restart all services on the failed node&lt;/span&gt;
gcluster_services all restart

&lt;span class="c"&gt;# Inspect the error log&lt;/span&gt;
&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-100f&lt;/span&gt; /opt/gbase/gnode/log/gbase/system.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;GBase 8a’s multi‑layered automation ensures that a single gnode crash rarely causes a service disruption. In a typical &lt;strong&gt;gbase database&lt;/strong&gt; deployment, the DBA’s role shifts from firefighting to monitoring edge cases where the automated machinery needs a helping hand.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
    </item>
    <item>
      <title>Monitoring Load and Export Task Progress in GBase 8a</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Sat, 16 May 2026 13:01:42 +0000</pubDate>
      <link>https://forem.com/michaelfv/monitoring-load-and-export-task-progress-in-gbase-8a-571h</link>
      <guid>https://forem.com/michaelfv/monitoring-load-and-export-task-progress-in-gbase-8a-571h</guid>
      <description>&lt;p&gt;When you're moving data in and out of GBase 8a, keeping an eye on task progress is crucial. GBASE's MPP database offers great real‑time monitoring for load jobs, while export progress requires a slightly different approach. Here's how to check both.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring Load Tasks
&lt;/h2&gt;

&lt;p&gt;For &lt;code&gt;LOAD DATA&lt;/code&gt; jobs, the primary view is &lt;code&gt;information_schema.load_status&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;USE&lt;/span&gt; &lt;span class="n"&gt;information_schema&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;load_status&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key columns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;STATE&lt;/strong&gt; – current status (&lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;FINISHED&lt;/code&gt;, &lt;code&gt;FAILED&lt;/code&gt;, etc.).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PROGRESS&lt;/strong&gt; – percentage complete; the most intuitive indicator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AVG_SPEED&lt;/strong&gt; – average throughput, useful for performance analysis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ELAPSED_TIME&lt;/strong&gt; – time spent so far.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LOADED_SIZE / TOTAL_SIZE&lt;/strong&gt; – data volume perspective of progress.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LOADED_RECORDS&lt;/strong&gt;, &lt;strong&gt;SKIPPED_RECORDS&lt;/strong&gt; – row‑level progress and data quality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DB_NAME, TB_NAME&lt;/strong&gt;, &lt;strong&gt;DATA_SOURCE&lt;/strong&gt;, &lt;strong&gt;SQL_CMD&lt;/strong&gt; – task context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once a load finishes, &lt;code&gt;load_status&lt;/code&gt; entries are removed. For historical results, query &lt;code&gt;information_schema.LOAD_RESULT&lt;/code&gt; (per coordinator) or &lt;code&gt;CLUSTER_LOAD_RESULT&lt;/code&gt; (cluster‑wide). To dig into failures, use &lt;code&gt;SHOW GCLUSTER LOAD LOGS &amp;lt;task_id&amp;gt;&lt;/code&gt; for detailed error traces.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring Export Tasks
&lt;/h2&gt;

&lt;p&gt;GBase 8a doesn't provide a dedicated progress view for &lt;code&gt;SELECT ... INTO OUTFILE&lt;/code&gt;. Instead, you rely on:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The process list&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;   &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;information_schema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;processlist&lt;/span&gt;
   &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;COMMAND&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'EXECUTING'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;INFO&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'%INTO OUTFILE%'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check &lt;code&gt;STATE&lt;/code&gt; (e.g., &lt;code&gt;SENDING DATA&lt;/code&gt;) and &lt;code&gt;TIME&lt;/code&gt; to see if the export is still running. However, there's no percentage progress available.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;File size at the destination&lt;/strong&gt;:
On the server where the output file is written, run &lt;code&gt;ls -lh&lt;/code&gt; periodically. If the file is growing, the export is still underway.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Errors for export tasks are usually reported to the client that issued the command, or you can check &lt;code&gt;express.log&lt;/code&gt; (under &lt;code&gt;$GCLUSTER_HOME/log/gcluster/&lt;/code&gt;). For very large exports, consider splitting the output into batches and pre‑counting rows to estimate completion.&lt;/p&gt;

&lt;p&gt;With these tools, you can stay on top of your &lt;strong&gt;gbase database&lt;/strong&gt; ETL jobs — load monitoring is comprehensive, and export monitoring, while a bit more manual, is straightforward once you know where to look.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>monitoring</category>
    </item>
    <item>
      <title>How to Audit Only Critical Operations Like DROP TABLE in GBase 8a</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Fri, 15 May 2026 08:24:00 +0000</pubDate>
      <link>https://forem.com/michaelfv/how-to-audit-only-critical-operations-like-drop-table-in-gbase-8a-ljm</link>
      <guid>https://forem.com/michaelfv/how-to-audit-only-critical-operations-like-drop-table-in-gbase-8a-ljm</guid>
      <description>&lt;p&gt;GBase 8a’s audit log can capture virtually every SQL operation. To keep logs lean and focused on security, you can configure a policy that records only high‑risk actions — like &lt;code&gt;DROP TABLE&lt;/code&gt; — using the &lt;code&gt;CREATE AUDIT POLICY&lt;/code&gt; command. This post shows you exactly how to set it up in a &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Audit Log Can Record
&lt;/h2&gt;

&lt;p&gt;The audit framework covers all major SQL categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DDL&lt;/strong&gt;: &lt;code&gt;CREATE&lt;/code&gt;, &lt;code&gt;ALTER&lt;/code&gt;, &lt;code&gt;DROP&lt;/code&gt; (including &lt;code&gt;DROP_TABLE&lt;/code&gt;, &lt;code&gt;DROP_DB&lt;/code&gt;), &lt;code&gt;TRUNCATE&lt;/code&gt;, &lt;code&gt;RENAME_USER&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DML&lt;/strong&gt;: &lt;code&gt;SELECT&lt;/code&gt;, &lt;code&gt;INSERT&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;LOAD&lt;/code&gt;, &lt;code&gt;MERGE&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DCL &amp;amp; Users&lt;/strong&gt;: &lt;code&gt;GRANT&lt;/code&gt;, &lt;code&gt;REVOKE&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;, &lt;code&gt;DROP_USER&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OTHERS&lt;/strong&gt;: any SQL not explicitly listed&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step‑by‑Step: Record Only High‑Risk Operations
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Enable Audit Logging to a Table
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="k"&gt;GLOBAL&lt;/span&gt; &lt;span class="n"&gt;log_output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'table'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="k"&gt;GLOBAL&lt;/span&gt; &lt;span class="n"&gt;audit_log&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Verify&lt;/span&gt;
&lt;span class="k"&gt;SHOW&lt;/span&gt; &lt;span class="n"&gt;VARIABLES&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'%audit_log%'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;SHOW&lt;/span&gt; &lt;span class="n"&gt;VARIABLES&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'%log_output%'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Create an Audit Policy (the key part)
&lt;/h3&gt;

&lt;p&gt;Use &lt;code&gt;CREATE AUDIT POLICY&lt;/code&gt; and list the exact commands you want to capture. &lt;strong&gt;Commands must be separated by commas with no spaces.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Only record DROP_TABLE, DROP_DB, TRUNCATE, DROP_USER&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;AUDIT&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="n"&gt;audit_critical&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;enable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Y'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;sql_commands&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'DROP_TABLE,DROP_DB,TRUNCATE,DROP_USER'&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Test and Verify
&lt;/h3&gt;

&lt;p&gt;Run a forbidden operation and check the log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;DROP&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;DROP&lt;/span&gt; &lt;span class="k"&gt;DATABASE&lt;/span&gt; &lt;span class="n"&gt;test_db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;start_time&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user_host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sql_command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;LEFT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sql_text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;sql_sample&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;gbase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;audit_log&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;start_time&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the policy is correct, you’ll see only &lt;code&gt;DROP_TABLE&lt;/code&gt; and &lt;code&gt;DROP_DB&lt;/code&gt; events — ordinary &lt;code&gt;SELECT&lt;/code&gt; statements won’t appear.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Clean Up (Optional)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;TRUNCATE&lt;/span&gt; &lt;span class="k"&gt;SELF&lt;/span&gt; &lt;span class="n"&gt;audit_log&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Going Further: Fine‑Grained Filtering
&lt;/h2&gt;

&lt;p&gt;You can combine &lt;code&gt;sql_commands&lt;/code&gt; with other dimensions for even tighter control:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;user&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Limit to a specific user&lt;/td&gt;
&lt;td&gt;&lt;code&gt;user='app_user'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;hosts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Filter by IP pattern (supports &lt;code&gt;%&lt;/code&gt;, &lt;code&gt;_&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;hosts='192.168.1.%'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;db&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Limit to a particular database&lt;/td&gt;
&lt;td&gt;&lt;code&gt;db='finance_db'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;long_query_time&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Only log slow queries (seconds)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;long_query_time=10&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;status&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Capture only failed or successful ops&lt;/td&gt;
&lt;td&gt;&lt;code&gt;status='FAILED'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Example: record &lt;code&gt;DROP_TABLE&lt;/code&gt; only when executed by &lt;code&gt;admin&lt;/code&gt; from host &lt;code&gt;192.168.1.100&lt;/code&gt; on the &lt;code&gt;prod_db&lt;/code&gt; database.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;AUDIT&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="n"&gt;audit_admin_drop&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;enable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Y'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'admin'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;hosts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'192.168.1.100'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'prod_db'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;sql_commands&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'DROP_TABLE'&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With a targeted policy like this, your &lt;strong&gt;gbase database&lt;/strong&gt; keeps a tight security audit trail without drowning in unnecessary log data. It’s a simple but powerful capability every DBA should have in their toolkit.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>security</category>
    </item>
    <item>
      <title>GBase 8a Data Distribution Strategies: Hash, Random, and Replicated Tables</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Fri, 15 May 2026 07:18:00 +0000</pubDate>
      <link>https://forem.com/michaelfv/gbase-8a-data-distribution-strategies-hash-random-and-replicated-tables-2hh</link>
      <guid>https://forem.com/michaelfv/gbase-8a-data-distribution-strategies-hash-random-and-replicated-tables-2hh</guid>
      <description>&lt;p&gt;GBase 8a MPP Cluster offers three primary data distribution strategies: &lt;strong&gt;Hash distribution&lt;/strong&gt;, &lt;strong&gt;random distribution&lt;/strong&gt;, and &lt;strong&gt;replicated tables&lt;/strong&gt;. Each determines how data is physically placed across nodes, directly impacting join and aggregation performance in a &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Strategy Overview
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;th&gt;Syntax&lt;/th&gt;
&lt;th&gt;Distribution Method&lt;/th&gt;
&lt;th&gt;Key Feature&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hash&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;DISTRIBUTED BY (column)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Rows with the same column value are mapped to the same node via hash.&lt;/td&gt;
&lt;td&gt;Data locality — related rows are physically together, ideal for joins and grouping.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Random&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Default (no keyword) or &lt;code&gt;DISTRIBUTED RANDOMLY&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Data is scattered evenly across all data nodes.&lt;/td&gt;
&lt;td&gt;Perfect load balancing — equal data volume and compute pressure on every node.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Replicated&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;REPLICATED&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A full copy of the table exists on every data node.&lt;/td&gt;
&lt;td&gt;Global redundancy — no network transfer needed for joins.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  When to Use Each Strategy
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Hash Distribution: Large Fact Tables, Frequent Joins
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best for&lt;/strong&gt;: Huge fact tables like orders or transaction logs that are frequently joined on a specific column (e.g., &lt;code&gt;user_id&lt;/code&gt;) or grouped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why&lt;/strong&gt;: Placing matching rows on the same node eliminates cross‑node data shuffling, delivering high‑performance local computation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch out for&lt;/strong&gt;: Data skew. Picking a low‑cardinality column (e.g., gender) can overload a few nodes. Choose a column with many unique values and even distribution.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Random Distribution: Standalone Large Tables or Staging Tables
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best for&lt;/strong&gt;: Access‑pattern logs, monitoring data, or intermediate ETL tables that are mostly full‑scanned.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why&lt;/strong&gt;: Guarantees perfect balance across nodes, maximizing parallel I/O and CPU utilization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trade‑off&lt;/strong&gt;: Joins and groupings will trigger heavy network redistribution, increasing query latency.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Replicated Tables: Small Dimension or Lookup Tables
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best for&lt;/strong&gt;: Small tables (usually under a few GB) like country codes, product categories, or compact user dimensions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why&lt;/strong&gt;: Every node has a full copy, so joins with any distributed table happen entirely locally — the fastest possible join.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost&lt;/strong&gt;: Storage multiplies by the node count, and every insert/update/delete must be applied to all nodes. Suited for read‑mostly or read‑only tables.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Best Practice
&lt;/h2&gt;

&lt;p&gt;Follow the rule: &lt;strong&gt;“Large fact tables → Hash, small dimension tables → Replicated, everything else → Random.”&lt;/strong&gt; Choosing the right strategy and distribution key based on actual query patterns is essential for keeping a &lt;strong&gt;gbase database&lt;/strong&gt; running at peak performance.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>performance</category>
    </item>
    <item>
      <title>Verifying That a GBase 8a Resource Plan Is Active and Enforcing Limits</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Fri, 15 May 2026 06:13:00 +0000</pubDate>
      <link>https://forem.com/michaelfv/verifying-that-a-gbase-8a-resource-plan-is-active-and-enforcing-limits-dm9</link>
      <guid>https://forem.com/michaelfv/verifying-that-a-gbase-8a-resource-plan-is-active-and-enforcing-limits-dm9</guid>
      <description>&lt;p&gt;After activating a resource plan on a virtual cluster, a few quick checks will confirm it's working as expected and restricting CPU, memory, and concurrency for the target users in a &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Confirm the Plan Is Active
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;gbase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resource_config&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;activated_plan&lt;/code&gt; column for the target VC should show the plan name you just activated (e.g., &lt;code&gt;plan_day&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Check User – Consumer Group Mapping
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;gbase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;consumer_group_user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The target user (e.g., &lt;code&gt;UserLoad&lt;/code&gt;) must belong to the expected consumer group (e.g., &lt;code&gt;group_load&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Check Group – Resource Pool Binding
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;gbase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resource_plan_directive&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;plan_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'plan_day'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see a directive that maps the consumer group to the correct resource pool (e.g., &lt;code&gt;low_pool&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Monitor Real‑Time Pool Usage (Core Validation)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SHOW&lt;/span&gt; &lt;span class="n"&gt;RESOURCE&lt;/span&gt; &lt;span class="n"&gt;POOL&lt;/span&gt; &lt;span class="k"&gt;USAGE&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;COORDINATORS&lt;/span&gt; 
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;resource_pool_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'low_pool'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;vc_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'vc1'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key metrics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cpu_usage_percent&lt;/code&gt; – should not exceed the pool’s defined percentage (e.g., 20%).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mem_usage_mb&lt;/code&gt; – must stay below &lt;code&gt;max_memory&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;active_task&lt;/code&gt; – must not exceed &lt;code&gt;max_activetask&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Verify That Tasks Land in the Right Pool
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;information_schema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;processlist&lt;/span&gt; 
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;resource_pool_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'low_pool'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;vc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'vc1'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the target user runs a query, the &lt;code&gt;RESOURCE_POOL_NAME&lt;/code&gt; column should show &lt;code&gt;low_pool&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Look for Enforcement Events
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SHOW&lt;/span&gt; &lt;span class="n"&gt;RESOURCE&lt;/span&gt; &lt;span class="n"&gt;POOL&lt;/span&gt; &lt;span class="n"&gt;EVENTS&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;resource_pool_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'low_pool'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;vc_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'vc1'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If resources are oversubscribed, you'll see &lt;code&gt;WAITING&lt;/code&gt; or &lt;code&gt;REJECTED&lt;/code&gt; events — clear evidence the plan is enforcing limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Proactive Testing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Concurrency limit test&lt;/strong&gt;: Set &lt;code&gt;max_activetask=2&lt;/code&gt; and launch 3 queries simultaneously. Use &lt;code&gt;SHOW RESOURCE POOL USAGE&lt;/code&gt; to confirm &lt;code&gt;active_task&lt;/code&gt; never exceeds 2, and the extra task stays in a waiting state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CPU weight test&lt;/strong&gt;: Run heavy queries from two users assigned to different pools (e.g., 20% vs. 80%) and watch the CPU usage ratio approach the defined weights.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Verification Checklist
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Command / Method&lt;/th&gt;
&lt;th&gt;Expected Outcome&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Plan activation&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SELECT * FROM gbase.resource_config&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;activated_plan&lt;/code&gt; shows the correct plan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;User‑group mapping&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SELECT * FROM gbase.consumer_group_user&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;User belongs to the intended group&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Group‑pool binding&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SELECT * FROM gbase.resource_plan_directive&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Directive links group to target pool&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pool usage&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SHOW RESOURCE POOL USAGE ...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;CPU/memory/task counts within limits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task routing&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SELECT * FROM processlist ...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Task’s &lt;code&gt;RESOURCE_POOL_NAME&lt;/code&gt; is correct&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enforcement events&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SHOW RESOURCE POOL EVENTS ...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Waiting/rejected events appear when limits are hit&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Once all checks pass, you can be confident that the resource plan is fully active and enforcing the desired fine‑grained control in your &lt;strong&gt;gbase database&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>monitoring</category>
    </item>
    <item>
      <title>How GBase 8a Resource Plans Bind to Time Schedules</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Fri, 15 May 2026 05:04:00 +0000</pubDate>
      <link>https://forem.com/michaelfv/how-gbase-8a-resource-plans-bind-to-time-schedules-4588</link>
      <guid>https://forem.com/michaelfv/how-gbase-8a-resource-plans-bind-to-time-schedules-4588</guid>
      <description>&lt;p&gt;Resource plans in GBase 8a (e.g., &lt;code&gt;plan_day&lt;/code&gt;, &lt;code&gt;plan_night&lt;/code&gt;) are &lt;strong&gt;not directly bound to time&lt;/strong&gt; and do &lt;strong&gt;not support cron expressions&lt;/strong&gt;. Their automated switching relies entirely on external schedulers — such as Linux crontab — that execute &lt;code&gt;ACTIVE&lt;/code&gt; / &lt;code&gt;DEACTIVE&lt;/code&gt; commands at the right moment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Mechanism: External Trigger, Internal Execution
&lt;/h2&gt;

&lt;p&gt;A resource plan is just a "policy container" — it takes effect only when activated (&lt;code&gt;ACTIVE&lt;/code&gt;). GBase 8a has no built‑in timer, so the full automation chain is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;External scheduler (crontab, etc.) fires at the scheduled time.&lt;/li&gt;
&lt;li&gt;A script connects to the database and runs the &lt;code&gt;ACTIVE&lt;/code&gt;/&lt;code&gt;DEACTIVE RESOURCE PLAN&lt;/code&gt; command.&lt;/li&gt;
&lt;li&gt;The plan swap takes effect.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Manual Switching Commands
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Activate the daytime plan&lt;/span&gt;
&lt;span class="n"&gt;ACTIVE&lt;/span&gt; &lt;span class="n"&gt;RESOURCE&lt;/span&gt; &lt;span class="n"&gt;PLAN&lt;/span&gt; &lt;span class="n"&gt;plan_day&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;VC&lt;/span&gt; &lt;span class="n"&gt;vc1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Deactivate the current plan&lt;/span&gt;
&lt;span class="n"&gt;DEACTIVE&lt;/span&gt; &lt;span class="n"&gt;RESOURCE&lt;/span&gt; &lt;span class="n"&gt;PLAN&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;VC&lt;/span&gt; &lt;span class="n"&gt;vc1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Activate the nighttime plan&lt;/span&gt;
&lt;span class="n"&gt;ACTIVE&lt;/span&gt; &lt;span class="n"&gt;RESOURCE&lt;/span&gt; &lt;span class="n"&gt;PLAN&lt;/span&gt; &lt;span class="n"&gt;plan_night&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;VC&lt;/span&gt; &lt;span class="n"&gt;vc1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Automating with Crontab
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a switching script&lt;/strong&gt; (e.g., &lt;code&gt;switch_plan.sh&lt;/code&gt;):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="nv"&gt;GC_CLI_PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/opt/gbase/bin/gccli
&lt;span class="nv"&gt;VC_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;vc1
&lt;span class="nv"&gt;USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;gbase
&lt;span class="nv"&gt;PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'your_password'&lt;/span&gt;

&lt;span class="c"&gt;# Deactivate the current plan, then activate the nighttime plan&lt;/span&gt;
&lt;span class="nv"&gt;$GC_CLI_PATH&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt;&lt;span class="nv"&gt;$USER&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt;&lt;span class="nv"&gt;$PASSWORD&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"DEACTIVE RESOURCE PLAN ON VC &lt;/span&gt;&lt;span class="nv"&gt;$VC_NAME&lt;/span&gt;&lt;span class="s2"&gt;; ACTIVE RESOURCE PLAN plan_night ON VC &lt;/span&gt;&lt;span class="nv"&gt;$VC_NAME&lt;/span&gt;&lt;span class="s2"&gt;;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set up crontab entries&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Activate daytime plan every day at 8:00 AM&lt;/span&gt;
0 8 &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; /opt/gbase/bin/gccli &lt;span class="nt"&gt;-ugbase&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt;&lt;span class="s1"&gt;'password'&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"ACTIVE RESOURCE PLAN plan_day ON VC vc1;"&lt;/span&gt;

&lt;span class="c"&gt;# Switch to nighttime plan every day at 8:00 PM&lt;/span&gt;
0 20 &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; /home/gbase/switch_plan.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure the executing user is allowed in &lt;code&gt;/etc/cron.allow&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why No Built‑in Cron‑Like Scheduler?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Separation of concerns&lt;/strong&gt;: The database focuses on enforcing resource limits; external tools handle complex scheduling logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexibility&lt;/strong&gt;: External scripts can switch plans based on load or other conditions, not just time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintainability&lt;/strong&gt;: Adjusting switch times only requires changing the external script — no database object modifications, reducing risk.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Production Recommendations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Prefer enterprise scheduling platforms (like GDOM) or job orchestration systems.&lt;/li&gt;
&lt;li&gt;Ensure the account running the commands (e.g., &lt;code&gt;gbase&lt;/code&gt;) has the necessary privileges.&lt;/li&gt;
&lt;li&gt;Add logging and error alerts to your scripts so you can monitor switch events in your gbase database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This design keeps the gbase database lean and gives you full control over when and how resource plans change.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
