mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 02:53:51 +08:00
Setting up single node is now: ``` CREATE EXTENSION IF NOT EXISTS iobeamdb CASCADE; select setup_single_node(); ``` To setup a cluster do (on meta node): ``` CREATE EXTENSION IF NOT EXISTS iobeamdb CASCADE; select set_meta(); ``` on data node: ``` CREATE EXTENSION IF NOT EXISTS iobeamdb CASCADE; select join_cluster('metadb', 'metahost'); ``` This assumes that the commands are issued by the same user on both the meta node and the data node. Otherwise the data node also has to specify the user name to use when connecting to the meta node.
25 lines
797 B
SQL
25 lines
797 B
SQL
|
|
\set ON_ERROR_STOP 1
|
|
\set VERBOSITY verbose
|
|
\set SHOW_CONTEXT never
|
|
|
|
\ir include/create_clustered_db.sql
|
|
|
|
\set ECHO ALL
|
|
\c Test1
|
|
|
|
--test hypertable with tables space
|
|
create tablespace tspace1 location :TEST_TABLESPACE_PATH;
|
|
create table test_tspace(time timestamp, temp float, device_id text) tablespace tspace1;
|
|
select create_hypertable('test_tspace', 'time', 'device_id');
|
|
select * from _iobeamdb_catalog.partition p INNER JOIN _iobeamdb_catalog.partition_replica pr ON (pr.partition_id = p.id);
|
|
insert into test_tspace values ('2017-01-20T09:00:01', 24.3, 'dev1');
|
|
insert into test_tspace values ('2017-01-20T09:00:02', 22.3, 'dev7');
|
|
\dt test_tspace
|
|
|
|
--verify that the table chunk has the correct tablespace
|
|
\d+ _iobeamdb_internal.*
|
|
|
|
--cleanup
|
|
drop table test_tspace;
|
|
drop tablespace tspace1; |