{"id":2165,"date":"2022-01-19T18:20:46","date_gmt":"2022-01-19T10:20:46","guid":{"rendered":"https:\/\/199604.com\/?p=2165"},"modified":"2022-01-19T18:20:46","modified_gmt":"2022-01-19T10:20:46","slug":"greenplum%e6%89%a9%e5%ae%b9-%e6%a8%aa%e5%90%91%e6%89%a9%e5%ae%b9","status":"publish","type":"post","link":"https:\/\/199604.com\/2165","title":{"rendered":"Greenplum\u6269\u5bb9-\u6a2a\u5411\u6269\u5bb9"},"content":{"rendered":"<h1>Greenplum\u6269\u5bb9-\u6a2a\u5411\u6269\u5bb9<\/h1>\n<h2>\u5b89\u88c5\u524d\u7684\u51c6\u5907<\/h2>\n<p>\u53c2\u8003:https:\/\/199604.com\/1570\u6216\u8005https:\/\/199604.com\/2070<\/p>\n<h2>\u57fa\u672c\u914d\u7f6e\u548c\u89c4\u5212<\/h2>\n<p>\u5982\u679c\u662f\u914d\u7f6e\u4e86mirror(\u955c\u50cf\u540c\u6b65),\u5c31\u9700\u8981\u4e00\u6b21\u65b0\u589e\u81f3\u5c11\u4e24\u53f0\u673a\u5668\u6269\u5bb9\uff0c\u4e0d\u7136\u4f1a\u62a5\u9519!!!<\/p>\n<h2>\u6269\u5bb9\u64cd\u4f5c<\/h2>\n<p>\u5728\u65b0\u7684\u4e24\u4e2a\u673a\u5668\u8fdb\u884c\u5982\u4e0b\u64cd\u4f5c\uff1a<\/p>\n<p>\u53c2\u8003:Greenplum\u96c6\u7fa4\u5b89\u88c5-\u65e0root\u8d26\u53f7\u4f46\u5b58\u5728sodu\u6743\u9650(https:\/\/199604.com\/2070)\u4e2d\u7684<\/p>\n<p>1.\u5b89\u88c5yum\u6e90<\/p>\n<p>2.\u5173\u95ed\u9632\u706b\u5899<\/p>\n<p>3.\u4fee\u6539hosts<\/p>\n<p>4.\u65f6\u95f4\u540c\u6b65<\/p>\n<p>5.\u4fee\u6539\u7cfb\u7edf\u53c2\u6570<\/p>\n<p>6.\u521b\u5efagpadmin\u7528\u6237<\/p>\n<p>7.\u6302\u8f7d\u6570\u636e\u78c1\u76d8\u5e76\u4e14\u521b\u5efagp\u6570\u636e\u76ee\u5f55<\/p>\n<p>8.\u62f7\u8d1dmaster\u4e3b\u673a\u7684\u5b89\u88c5gp\u7684\u76ee\u5f55<\/p>\n<p>master\u4e3b\u673a\u64cd\u4f5c<\/p>\n<pre><code class=\"language-bash \">#master\u4e3b\u673a\u64cd\u4f5c\ncd \/usr\/local &amp;&amp;  tar -cf \/usr\/local\/ greenplum-db.tar  greenplum-db\n\n# master\u4e3b\u673a\u64cd\u4f5c-\u590d\u5236\u5230\u65b0\u673a\u5668\u4e0a\nscp greenplum-db.tar root@sdwnew1:\/usr\/local\/ \nscp greenplum-db.tar root@sdwnew2:\/usr\/local\/ \n<\/code><\/pre>\n<p>\u65b0\u4e3b\u673a\u4e0a\u64cd\u4f5c<\/p>\n<pre><code class=\"language-bash \">cd \/usr\/local\ntar -xf greenplum-db.tar\nchown -R gpadmin:gpadmin greenplum-db*\n\n# \u4fee\u6539\u73af\u5883\u53d8\u91cf\nvi \/home\/gpadmin\/.bash_profile\n\n# \u6dfb\u52a0\uff1a\u653e\u5bf9\u5730\u65b9\n# PATH=$PATH:$HOME\/bin\nsource \/usr\/local\/greenplum-db\/greenplum_path.sh\n# export PATH\n\n# \u6267\u884c\u4e00\u4e0b\uff1a\nsource \/home\/gpadmin\/.bash_profile\n<\/code><\/pre>\n<p>9.\u4fee\u6539seg_hosts\uff0call_hosts\u6587\u4ef6\uff0c\u6dfb\u52a0\u65b0\u4e3b\u673a\u540d\u8fdb\u53bb,\u56e0\u4e3a\u6211\u8fd9\u8fb9\u7684master\u4e5f\u505a\u4e86\u8282\u70b9,\u56e0\u6b64seg_hosts\u548call_hosts\u662f\u540c\u4e00\u4e2a\u6587\u4ef6,\u54c8\u54c8\u54c8\u54c8<\/p>\n<p>10.\u6267\u884c\u5efa\u7acb\u591a\u673a\u4fe1\u4efb(\u91cd\u505a\u514d\u5bc6)<\/p>\n<p>Master\u4e3b\u673a<code>gpadmin<\/code>\u7528\u6237\u5efa\u7acb\u591a\u673a\u4fe1\u4efb<\/p>\n<p><code>gpssh-exkeys -f \/home\/gpadmin\/all_hosts<\/code><\/p>\n<p>\u5efa\u7acb\u591a\u673a\u4fe1\u4efb\u5b8c\u6bd5\u540e,\u6d4b\u8bd5\u5404\u4e2a\u8282\u70b9\u662f\u5426\u80fd\u8fde\u901a<\/p>\n<p><code>gpssh -f .\/all_hosts<\/code><\/p>\n<pre><code class=\"language-bash \">[gpadmin@mdw gpconfigs]$ gpssh -h mdw\n=&gt; echo $HOSTNAME   \n[mdw] mdw\n=&gt; exit\n<\/code><\/pre>\n<p>11.\u521b\u5efa\u521d\u59cb\u5316\u6587\u4ef6<\/p>\n<p>\u6267\u884c\uff1a<code>gpexpand -f all_hosts<\/code>\u540e\u6211\u8fd9\u8fb9\u662f\u62a5\u4e86:(ps:\u56e0\u4e3a\u6211\u8fd9\u8fb9\u7684master\u4e5f\u505a\u4e86\u8282\u70b9,\u56e0\u6b64seg_hosts\u548call_hosts\u662f\u540c\u4e00\u4e2a\u6587\u4ef6\u5e73\u65f6)<\/p>\n<pre><code class=\"language-bash \">[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -f all_hosts \n20220119:17:33:52:501662 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'\n20220119:17:33:52:501662 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'\n20220119:17:33:53:501662 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state\n20220119:17:33:53:501662 gpexpand:hljydwxywgzt4-7:gpadmin-[ERROR]:-gpexpand failed: Invalid database 'postgres' specified.  Cannot use a template database.\nPlease set the environment variable PGDATABASE to a different database or use the -D option to specify a database and re-run\n<\/code><\/pre>\n<p>\u8fd9\u662f\u56e0\u4e3a\u6211\u4e4b\u524d\u90e8\u7f72\u65f6\u5019\u6307\u5b9a\u4e86\u6570\u636e\u5e93 \u56e0\u6b64\u662f\u9700\u8981\u6267\u884c:<code>gpexpand -f all_hosts -D lte_mr<\/code><\/p>\n<pre><code class=\"language-bash \">[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -f all_hosts -D lte_mr\n20220119:17:34:33:501872 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'\n20220119:17:34:33:501872 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'\n20220119:17:34:33:501872 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state\n\nSystem Expansion is used to add segments to an existing GPDB array.\ngpexpand did not detect a System Expansion that is in progress.\n\nBefore initiating a System Expansion, you need to provision and burn-in\nthe new hardware.  Please be sure to run gpcheckperf to make sure the\nnew hardware is working properly.\n\nPlease refer to the Admin Guide for more information.\n\nWould you like to initiate a new System Expansion Yy|Nn (default=N):\n&gt; Y\n\nYou must now specify a mirroring strategy for the new hosts.  Spread mirroring places\na given hosts mirrored segments each on a separate host.  You must be \nadding more hosts than the number of segments per host to use this. \nGrouped mirroring places all of a given hosts segments on a single \nmirrored host.  You must be adding at least 2 hosts in order to use this.\n\n\n\nWhat type of mirroring strategy would you like?\n spread|grouped (default=grouped):\n&gt; \n\n    By default, new hosts are configured with the same number of primary\n    segments as existing hosts.  Optionally, you can increase the number\n    of segments per host.\n\n    For example, if existing hosts have two primary segments, entering a value\n    of 2 will initialize two additional segments on existing hosts, and four\n    segments on new hosts.  In addition, mirror segments will be added for\n    these new primary segments if mirroring is enabled.\n\n\nHow many new primary segments per host do you want to add? (default=0):\n&gt; \n\nGenerating configuration file...\n\n20220119:17:35:20:501872 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Generating input file...\n\nInput configuration files were written to 'gpexpand_inputfile_20220119_173520' and 'None'.\nPlease review the file and make sure that it is correct then re-run\nwith: gpexpand -i gpexpand_inputfile_20220119_173520 -D lte_mr\n\n20220119:17:35:20:501872 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Exiting...\n<\/code><\/pre>\n<p>\u67e5\u770b\u521d\u59cb\u5316\u7684\u6587\u4ef6\uff1a<\/p>\n<pre><code class=\"language-bash \">[gpadmin@hljydwxywgzt4-7 ~]$ ll -rth\ntotal 199M\n-rwxr-xr-x 1 gpadmin gpadmin 198M Jan 18 18:10 greenplum-db-5.28.14-rhel7-x86_64.bin\n-rw-rw-r-- 1 gpadmin gpadmin  293 Jan 18 19:03 check\n-rw-rw-r-- 1 gpadmin gpadmin   48 Jan 18 19:07 hostfile_gpinitsystem\n-rw-rw-r-- 1 gpadmin gpadmin  400 Jan 18 19:18 gpinitsystem_config\n-rw-rw-r-- 1 gpadmin gpadmin   80 Jan 19 17:18 all_hosts\ndrwxrwxr-x 2 gpadmin gpadmin 4.0K Jan 19 17:29 gpAdminLogs\n-rw-rw-r-- 1 gpadmin gpadmin  292 Jan 19 17:35 gpexpand_inputfile_20220119_173520\n[gpadmin@hljydwxywgzt4-7 ~]$ \n[gpadmin@hljydwxywgzt4-7 ~]$ cat gpexpand_inputfile_20220119_173520\nhljydwxywgzt-4:hljydwxywgzt-4:40000:\/data\/gp\/primary\/gpseg3:8:3:p:41000\nhljydwxywgzt3-4:hljydwxywgzt3-4:50000:\/data\/gp\/mirror\/gpseg3:11:3:m:51000\nhljydwxywgzt3-4:hljydwxywgzt3-4:40000:\/data\/gp\/primary\/gpseg4:9:4:p:41000\nhljydwxywgzt-4:hljydwxywgzt-4:50000:\/data\/gp\/mirror\/gpseg4:10:4:m:51000\n<\/code><\/pre>\n<p>12.\u521d\u59cb\u5316Segment\u5e76\u4e14\u521b\u5efa\u6269\u5bb9schema<\/p>\n<p>\u6267\u884c\uff1a<code>gpexpand -i gpexpand -i gpexpand_inputfile_20220119_173520 -D lte_mr<\/code><\/p>\n<pre><code class=\"language-bash \">[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -i gpexpand_inputfile_20220119_173520 -D lte_mr\n20220119:17:36:32:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'\n20220119:17:36:32:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'\n20220119:17:36:39:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state\n20220119:17:36:40:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Readying Greenplum Database for a new expansion\n20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database template1 for unalterable tables...\n20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database postgres for unalterable tables...\n20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database lte_mr for unalterable tables...\n20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database template1 for tables with unique indexes...\n20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database postgres for tables with unique indexes...\n20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database lte_mr for tables with unique indexes...\n20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Heap checksum setting consistent across cluster\n20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Syncing Greenplum Database extensions\n20220119:17:36:48:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-The packages on hljydwxywgzt3-4 are consistent.\n20220119:17:36:48:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-The packages on hljydwxywgzt-4 are consistent.\n20220119:17:36:48:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Creating segment template\n20220119:17:36:48:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-VACUUM FULL on the catalog tables\n20220119:17:36:50:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting copy of segment dbid 1 to location \/data\/master\/gpexpand_01192022_502763\n20220119:17:36:50:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Copying postgresql.conf from existing segment into template\n20220119:17:36:51:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Copying pg_hba.conf from existing segment into template\n20220119:17:36:51:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Adding new segments into template pg_hba.conf\n20220119:17:36:51:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Creating schema tar file\n20220119:17:36:51:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Distributing template tar file to new hosts\n20220119:17:36:52:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Configuring new segments (primary)\n20220119:17:36:53:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Configuring new segments (mirror)\n20220119:17:36:53:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Backing up pg_hba.conf file on original segments\n20220119:17:36:54:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Copying new pg_hba.conf file to original segments\n20220119:17:36:54:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Configuring original segments\n20220119:17:36:54:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Cleaning up temporary template files\n20220119:17:36:54:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting Greenplum Database in restricted mode\n20220119:17:37:01:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Stopping database\n20220119:17:37:06:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking if Transaction filespace was moved\n20220119:17:37:06:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking if Temporary filespace was moved\n20220119:17:37:06:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Configuring new segment filespaces\n20220119:17:37:06:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Cleaning up databases in new segments.\n20220119:17:37:06:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting master in utility mode\n20220119:17:37:08:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Stopping master in utility mode\n20220119:17:37:12:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting Greenplum Database in restricted mode\n20220119:17:37:18:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Creating expansion schema\n20220119:17:37:18:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Populating gpexpand.status_detail with data from database template1\n20220119:17:37:19:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Populating gpexpand.status_detail with data from database postgres\n20220119:17:37:19:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Populating gpexpand.status_detail with data from database lte_mr\n20220119:17:37:19:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Stopping Greenplum Database\n20220119:17:37:25:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting Greenplum Database\n20220119:17:37:31:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting new mirror segment synchronization\n20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-************************************************\n20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Initialization of the system expansion complete.\n20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-To begin table expansion onto the new segments\n20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-rerun gpexpand\n20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-************************************************\n20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Exiting...\n[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -d 1:00:00\n20220119:17:38:28:506460 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'\n20220119:17:38:28:506460 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'\n20220119:17:38:28:506460 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state\n20220119:17:38:28:506460 gpexpand:hljydwxywgzt4-7:gpadmin-[ERROR]:-gpexpand failed: Error while trying to query the gpexpand schema: gpexpand schema exists in database lte_mr, not in postgres.\nSet PGDATABASE or use the -D option to specify the correct database to use. \n\nExiting...\n<\/code><\/pre>\n<p>13.\u91cd\u5206\u5e03\u6570\u636e<\/p>\n<p>\u6267\u884c\uff1a<code>gpexpand -d 1:00:00<\/code> \u56e0\u4e3a\u6211\u9700\u8981\u6307\u5b9a\u6570\u636e\u5e93:<code>gpexpand -d 1:00:00 -D lte_mr<\/code><\/p>\n<p><code>gpexpand<\/code>\u547d\u4ee4-d\u53c2\u6570\u4e3a\u91cd\u5206\u5e03\u7684\u5468\u671f\uff0c\u4e5f\u5c31\u662f\u6700\u5927\u591a\u957f\u65f6\u95f4\u5b8c\u6210\uff0c\u683c\u5f0f\u4e3ahh:mm:ss\uff0c\u91cd\u5206\u5e03\u5b8c\u6210\u540e<\/p>\n<pre><code class=\"language-bash \">[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -d 1:00:00 -D lte_mr\n20220119:17:38:33:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'\n20220119:17:38:33:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'\n20220119:17:38:33:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state\n20220119:17:38:34:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Distribution policy for table public.test_1 is 'a' \n20220119:17:38:34:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Expanding lte_mr.public.test_1\n20220119:17:38:34:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Finished expanding lte_mr.public.test_1\n20220119:17:38:39:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-EXPANSION COMPLETED SUCCESSFULLY\n20220119:17:38:39:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Exiting...\n[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -c -D lte_mr\n20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'\n20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'\n20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state\n\n\nDo you want to dump the gpexpand.status_detail table to file? Yy|Nn (default=Y):\n&gt; y\n20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Dumping gpexpand.status_detail to \/data\/master\/gpseg-1\/gpexpand.status_detail\n20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Removing gpexpand schema\n20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Cleanup Finished.  exiting...\n<\/code><\/pre>\n<p>14.\u79fb\u9664\u6269\u5bb9schema<\/p>\n<p>\u6267\u884c\u547d\u4ee4\uff1a<code>gpexpand -c<\/code>\u56e0\u4e3a\u6211\u9700\u8981\u6307\u5b9a\u6570\u636e\u5e93:<code>gpexpand -c -D lte_mr<\/code><\/p>\n<pre><code class=\"language-bash \">[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -c -D lte_mr\n20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'\n20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'\n20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state\n\n\nDo you want to dump the gpexpand.status_detail table to file? Yy|Nn (default=Y):\n&gt; y\n20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Dumping gpexpand.status_detail to \/data\/master\/gpseg-1\/gpexpand.status_detail\n20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Removing gpexpand schema\n20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Cleanup Finished.  exiting...\n<\/code><\/pre>\n<p>15.\u67e5\u770b\u6269\u5bb9\u7ed3\u679c\uff1a<code>gpstate -c<\/code><\/p>\n<pre><code class=\"language-bash \">[gpadmin@hljydwxywgzt4-7 ~]$ gpstate -c\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting gpstate with args: -c\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-Obtaining Segment details from master...\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:--------------------------------------------------------------\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:--Current GPDB mirror list and status\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:--Type = Spread\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:--------------------------------------------------------------\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Status                             Data State        Primary           Datadir                   Port    Mirror            Datadir                  Port\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Primary Active, Mirror Available   Synchronized      hljydwxywgzt4-7   \/data\/gp\/primary\/gpseg0   40000   hljydwxywgzt2-4   \/data\/gp\/mirror\/gpseg0   50000\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Primary Active, Mirror Available   Synchronized      hljydwxywgzt2-4   \/data\/gp\/primary\/gpseg1   40000   hljydwxywgzt-8    \/data\/gp\/mirror\/gpseg1   50000\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Primary Active, Mirror Available   Synchronized      hljydwxywgzt-8    \/data\/gp\/primary\/gpseg2   40000   hljydwxywgzt4-7   \/data\/gp\/mirror\/gpseg2   50000\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Primary Active, Mirror Available   Resynchronizing   hljydwxywgzt-4    \/data\/gp\/primary\/gpseg3   40000   hljydwxywgzt3-4   \/data\/gp\/mirror\/gpseg3   50000\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Primary Active, Mirror Available   Resynchronizing   hljydwxywgzt3-4   \/data\/gp\/primary\/gpseg4   40000   hljydwxywgzt-4    \/data\/gp\/mirror\/gpseg4   50000\n20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:--------------------------------------------------------------\n<\/code><\/pre>\n<blockquote><p>\n  \u6ce8\u610f\uff1a\u5982\u679c\u5728\u6269\u5bb9\u7684\u65f6\u5019\u5931\u8d25\u6216\u8005\u51fa\u9519\u4e86\uff0c\u8bb0\u5f97\u56de\u6eda\uff1a<code>gpexpand -r<\/code> \uff0c\u8fd8\u6709\u5c31\u662f\u6269\u5bb9\u6210\u529f\uff0c\u6570\u636e\u91cd\u5206\u5e03\u6210\u529f\u540e\u8bb0\u5f97\u4f7f\u7528<code>analyze<\/code>\u6216\u8005<code>analyzedb<\/code>\u8fdb\u884c\u5206\u6790\n<\/p><\/blockquote>\n<p>\u53c2\u8003:<\/p>\n<p><code>https:\/\/www.cnblogs.com\/zsql\/p\/14602563.html<\/code><\/p>\n<p><code>http:\/\/www.dbdream.com.cn\/2016\/03\/greenplum%E6%95%B0%E6%8D%AE%E5%BA%93%E6%89%A9%E5%AE%B9-%E5%A2%9E%E5%8A%A0segment\/<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Greenplum\u6269\u5bb9-\u6a2a\u5411\u6269\u5bb9 \u5b89\u88c5\u524d\u7684\u51c6\u5907 \u53c2\u8003:https:\/\/199604.com\/1570\u6216\u8005htt [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[257,304,260],"tags":[259,276],"class_list":["post-2165","post","type-post","status-publish","format-standard","hentry","category-gp","category-greenplum","category-linux","tag-centos","tag-greenplum"],"_links":{"self":[{"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/posts\/2165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/comments?post=2165"}],"version-history":[{"count":1,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/posts\/2165\/revisions"}],"predecessor-version":[{"id":2166,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/posts\/2165\/revisions\/2166"}],"wp:attachment":[{"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/media?parent=2165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/categories?post=2165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/tags?post=2165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}