Timescale Cloud:性能、扩展、企业级

自托管产品

MST

获取数据节点信息。此函数专用于多节点 TimescaleDB 配置。

警告

多节点支持已停用.

TimescaleDB v2.13 是最后一个包含对 PostgreSQL 13、14 和 15 版本多节点支持的版本。

名称类型描述
node_nameTEXT数据节点名称。
ownerREGCLASS添加数据节点的用户 Oid。
optionsJSONB创建数据节点时使用的选项。

获取与数据节点相关的元数据。

SELECT * FROM timescaledb_information.data_nodes;
node_name | owner | options
--------------+------------+--------------------------------
dn1 | postgres | {host=localhost,port=15431,dbname=test}
dn2 | postgres | {host=localhost,port=15432,dbname=test}
(2 rows)

获取超表的元数据信息。

名称类型描述
hypertable_schemaTEXT超表的模式名称
hypertable_nameTEXT超表的表名
ownerTEXT超表的拥有者
num_dimensionsSMALLINT维度数量
num_chunksBIGINT块数量
compression_enabledBOOLEAN超表是否启用了压缩?
is_distributedBOOLEAN超表是否为分布式?
replication_factorSMALLINT分布式超表的复制因子
data_nodesARRAY超表分布所在的节点
tablespacesARRAY附加到超表的表空间

获取超表信息。

CREATE TABLE dist_table(time timestamptz, device int, temp float);
SELECT create_distributed_hypertable('dist_table', 'time', 'device', replication_factor => 2);
SELECT * FROM timescaledb_information.hypertables
WHERE hypertable_name = 'dist_table';
-[ RECORD 1 ]-------+-----------
hypertable_schema | public
hypertable_name | dist_table
owner | postgres
num_dimensions | 2
num_chunks | 3
compression_enabled | f
is_distributed | t
replication_factor | 2
data_nodes | {node_1, node_2}
tablespaces |

关键词

在此页面上发现问题?报告问题 或 编辑此页面 在 GitHub。