Get information on data nodes. This function is specific to running TimescaleDB in a multi-node setup.

NameTypeDescription
node_nameTEXTData node name.
ownerREGCLASSOid of the user, who added the data node.
optionsJSONBOptions used when creating the data node.

Get metadata related to data nodes.

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)

Get metadata information about hypertables.

NameTypeDescription
hypertable_schemaTEXTSchema name of the hypertable
hypertable_nameTEXTTable name of the hypertable
ownerTEXTOwner of the hypertable
num_dimensionsSMALLINTNumber of dimensions
num_chunksBIGINTNumber of chunks
compression_enabledBOOLEANIs compression enabled on the hypertable?
is_distributedBOOLEANIs the hypertable distributed?
replication_factorSMALLINTReplication factor for a distributed hypertable
data_nodesARRAYNodes on which hypertable is distributed
tablespacesARRAYTablespaces attached to the hypertable

Get information about a hypertable.

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 |

Keywords

Found an issue on this page?Report an issue or Edit this page in GitHub.