创建分布式超级表的Timescale DB

huangapple go评论77阅读模式
英文:

Timescale DB Create distributed hypertable

问题

I want to create a PoC of a distributed hypertable, using TimescaleDB and docker compose.

I've set up a docker compose with two instances and created the respective table in both instances.

Let's say instance A is the access node (main node)
Before executing the query SELECT create_distributed_hypertable('sensor_data', 'time', 'sensor_id');, I added the other data node successfully by running: SELECT add_data_node('australia-node', host => 'au-db', password => 'XXXXX', database => 'XXXXX');

Also, by querying SELECT * FROM timescaledb_information.data_nodes;, the australia-node is the only entry in this view, meaning that it is recognized by the access node

When I try to run SELECT create_distributed_hypertable('sensor_data', 'time', 'sensor_id');, I receive the following error:

SQL Error [08001]: ERROR: could not connect to "australia-node" Detail: fe_sendauth: no password supplied

Note: I execute all the queries using DBeaver SQL editor.

英文:

I want to create a PoC of a distributed hypertable, using TimescaleDB and docker compose.

I've set up a docker compose with two instances and created the respective table in both instances.

Let's say instance A is the access node (main node)
Before executing the query SELECT create_distributed_hypertable('sensor_data', 'time', 'sensor_id');, I added the other data node successfully by running: SELECT add_data_node('australia-node', host => 'au-db', password => 'XXXXX', database => 'XXXXX');

Also, by querying SELECT * FROM timescaledb_information.data_nodes;, the australia-node is the only entry in this view, meaning that it is recgonized by the access node

When I try to run SELECT create_distributed_hypertable('sensor_data', 'time', 'sensor_id');, I receive the folllowing error:

SQL Error [08001]: ERROR: could not connect to "australia-node" Detail: fe_sendauth: no password supplied

Note: I execute all the queries, using DBeaver SQL editor

答案1

得分: 1

Once your instances are up and running, you need to configure authentication so that data nodes accept connections from the access node. This is what we refer to as Multi-node authentication.

Since it is a PoC, go for Trust authentication, which trusts all incoming connections, and then create a distributed hypertable.

Reference: https://docs.timescale.com/self-hosted/latest/multinode-timescaledb/multinode-auth/

英文:

Once your instances are up and running, you need to configure authentication so that data nodes accept connections from access node. This is what we refer as Multi-node authentication.

Since it is a PoC, go for Trust authentication which trusts all incoming connections and then create distributed hypertable

Reference: https://docs.timescale.com/self-hosted/latest/multinode-timescaledb/multinode-auth/

huangapple
  • 本文由 发表于 2023年5月10日 20:48:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/76218622.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定