23 Commits

Author SHA1 Message Date
Rob Kiefer
cb90eef350 Rename setup_db() and fix port for local connections
If a user attempts to setup a database while not connecting using
the network, port is NULL and thus fails constraint checks. Instead,
we now use the default Postgres port of 5432 when this happens.

Also, setup_db() is renamed to setup_timescaledb() for clarity in
the presence of other extensions.
2017-03-22 09:26:03 -04:00
Erik Nordström
b4c9055184 Move generate_typedef.sh to scripts directory 2017-03-16 10:48:21 +01:00
Rob Kiefer
55736b9262 Add a migrate data script for large datasets
Currently TimescaleDB does not close chunks mid-insert, so large
batches will overfill a chunk. This commit adds a script to
split large CSV files into smaller batches to allow reasonable
closing of chunks.
2017-03-10 11:41:11 -05:00
Rob Kiefer
3760993519 Renames setup_single_node() to setup_db() 2017-03-06 15:36:29 -05:00
Erik Nordström
11938ebb08 Default to asking for number of partitions when partitioning column set.
Since create_hypertable() allows you to optionally specify a
partitioning column, it makes sense to default to one partition when
no column is specified and asking for the number of partitions when a
column is specified and the number of partitions is not (instead of
defaulting to one).

This patch also changes the order and type of partitioning-related
input arguments to create_hypertable() so that the number of
partitions can easily be specified alongside the partitioning column
and without type casting.
2017-03-06 20:26:02 +01:00
Rob Kiefer
ee3ad4678d Rename iobeamdb to TimescaleDB 2017-03-06 11:06:49 -05:00
Erik Nordström
036c40886c Simplify cluster setup
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.
2017-02-07 12:22:36 +01:00
Rob Kiefer
a2198b7c72 Initial draft of sample docs. Update README 2017-02-02 12:44:25 -05:00
Rob Kiefer
574d6202cd Add bash script for setting up single-node cluster with user-defined DB name 2017-02-01 16:03:24 -05:00
Matvey Arye
d3a3670aa6 Merged in install-nits (pull request #71)
nit to installation/docker
2017-01-31 22:03:14 +00:00
Erik Nordström
7b94c573ba Refactor directory structure and tests
- Directory structure now matches common practices
- Regression tests now run with pg_regress via the PGXS infrastructure.
- Unit tests do not integrate well with pg_regress and have to be run
  separately.
- Docker functionality is separate from main Makefile. Run with
  `make -f docker.mk` to build and `make -f docker.mk run` to run
  the database in a container.
2017-01-31 20:14:19 +01:00
Olof Rensfelt
b919df869f runs test docker om different port 2017-01-31 13:04:27 +01:00
Erik Nordström
8abc301e51 Add support for tablespaces
Identically named tablespaces need to exist on each data node before
a hypertable is created from a table that references a tablespace.
2017-01-31 10:38:01 +01:00
Matvey Arye
97205a7cec Misc usability fixes 2017-01-24 17:26:57 -05:00
Matvey Arye
ce5e1aecd7 Changes to Makefile and associated scripts to make docker commands act as expected + to mount a data volume 2017-01-24 14:59:54 -05:00
Rob Kiefer
29bc320cfb Add Getting Started instructions to README 2017-01-19 14:53:38 -05:00
Matvey Arye
64526426c5 Allow single-node deployments that use one database.
Allowing database deployments that use the same database for both the
meta and node roles simplifies operations when iobeamdb is deployed on
a single-node. It allows the database to operate without any
cross-network communication (either through dblink or postgres_fdw) and
thus offers stronger consistency guarantees.
2017-01-18 19:03:53 -05:00
Rob Kiefer
0ec5095cf5 Cleanup Makefile targets, script names, and README 2017-01-16 10:49:08 -05:00
Erik Nordström
a27f71b614 Rename add_hypertable() -> create_hypertable() 2017-01-16 14:45:15 +01:00
Matvey Arye
228b8eeab7 handle dblink correctlty for meta->data too 2017-01-13 13:25:46 -05:00
Matvey Arye
94ab3b95d6 Upadting docs 2016-12-23 16:21:01 -05:00
Matvey Arye
490019d20b Use C parse-tree modifications to transform queries on main tables to that on replica tables 2016-12-23 14:32:45 -05:00
Olof Rensfelt
0f3aa8d557 * Add _meta schema to allow all code to be loaded on both meta and nodes.
* Split SQL into functions and setup.
* Remove hash-lib dependency.
* Makes code into Postgresql extension.
2016-12-20 16:10:59 +01:00