I have been working on timescaleDB multi-node concept, In my case I have an access node, and four data node. When I created the distributed hyper table I have set replication factor to four.
adding data node
SELECT add_data_node('dn1', host => '192.168.5.119', port => 5432, password => 'pass');
CREATE USER MAPPING FOR bennison SERVER dn1 OPTIONS (user 'pass', password 'pass');
For example, first data node name is dn1, and the second data node name is dn3, third, and fourth one is d3, d4.
SELECT create_distributed_hypertable('sensor_data', 'time', 'sensor_id', replication_factor => 4);
As I have set the replication factor to four, all data node chunk data will be stored in other data nodes. In my all data node I have installed the timescaledb-tune also.
After the all configuration, I just run the insert query it works fine.
INSERT INTO sensor_data VALUES ('2020-12-09',1,32.2,0.45);
If I down the data node 2 or three, I can run the read-only query (select query) on the access node that get the response back.
select * from sensor_data;
Here the thing is, If I down the data node one (dn1), I could not run the any query especially read only query. Here the error looks like
test=# select * from sensor_data ;
ERROR: [dn1]: FATAL: terminating connection due to administrator command
SSL connection has been closed unexpectedly
test=#
I want to know about, Why this error happens when the first data node is down, why this error is not happening other data node is down.
Is this possible run the query successfully, while the either one of the data node is in down. If not what will be the solution for this. If not any other way to implement the cluster in timescaleDB?