Timescale Cloud:性能、扩展、企业级
自托管产品
MST
获取数据节点信息。此函数专用于多节点 TimescaleDB 配置。
警告
TimescaleDB v2.13 是最后一个包含对 PostgreSQL 13、14 和 15 版本多节点支持的版本。
名称 | 类型 | 描述 |
---|---|---|
node_name | TEXT | 数据节点名称。 |
owner | REGCLASS | 添加数据节点的用户 Oid。 |
options | JSONB | 创建数据节点时使用的选项。 |
获取与数据节点相关的元数据。
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_schema | TEXT | 超表的模式名称 |
hypertable_name | TEXT | 超表的表名 |
owner | TEXT | 超表的拥有者 |
num_dimensions | SMALLINT | 维度数量 |
num_chunks | BIGINT | 块数量 |
compression_enabled | BOOLEAN | 超表是否启用了压缩? |
is_distributed | BOOLEAN | 超表是否为分布式? |
replication_factor | SMALLINT | 分布式超表的复制因子 |
data_nodes | ARRAY | 超表分布所在的节点 |
tablespaces | ARRAY | 附加到超表的表空间 |
获取超表信息。
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.hypertablesWHERE hypertable_name = 'dist_table';-[ RECORD 1 ]-------+-----------hypertable_schema | publichypertable_name | dist_tableowner | postgresnum_dimensions | 2num_chunks | 3compression_enabled | fis_distributed | treplication_factor | 2data_nodes | {node_1, node_2}tablespaces |
关键词