数据仓库服务 GAUSSDB(DWS)-PGXC_NODE:应用示例

时间:2023-11-22 14:18:40

应用示例

查询集群的CN和DN信息:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
select * from pgxc_node;
  node_name   | node_type | node_port |   node_host    | node_port1 |   node_host1   | hostis_primary | nodeis_primary | nodeis_preferred
 |   node_id   | sctp_port | control_port | sctp_port1 | control_port1 | nodeis_central
--------------+-----------+-----------+----------------+------------+----------------+----------------+----------------+-----------------
-+-------------+-----------+--------------+------------+---------------+----------------
 dn_6001_6002 | D         |     40000 | 192.**.***.**1 |      45000 | 192.**.**.**2  | t              | f              | f
 |  1644780306 |     40002 |        40003 |      45002 |         45003 | f
 dn_6003_6004 | D         |     40000 | 192.**.**.**2  |      45000 | 192.**.**.**3  | t              | f              | f
 |  -966646068 |     40002 |        40003 |      45002 |         45003 | f
 dn_6005_6006 | D         |     40000 | 192.**.**.**3  |      45000 | 192.**.***.**1 | t              | f              | f
 |   868850011 |     40002 |        40003 |      45002 |         45003 | f
 cn_5001      | C         |      8000 | 192.**.***.**1 |       8000 | 192.**.***.**1 | t              | f              | f
 |  1120683504 |      8002 |         8003 |          0 |             0 | f
 cn_5002      | C         |      8000 | 192.**.**.**2  |       8000 | 192.**.**.**2  | t              | f              | f
 | -1736975100 |      8002 |         8003 |          0 |             0 | f
 cn_5003      | C         |      8000 | localhost      |       8000 | localhost      | t              | f              | f
 |  -125853378 |      8002 |         8003 |          0 |             0 | t
(6 rows)
support.huaweicloud.com/devg-820-dws/dws_04_0635.html