18 Commits

Author SHA1 Message Date
Olof Rensfelt
d070514f2a Fixed time chunk ranges.
To allow better caching and reduce the need for locking, chunks now
have fixed start and stop times set when the chunk is created.
2017-04-23 19:45:46 -04:00
Matvey Arye
f908671e04 Fix bug with simultaneous chunk creation.
Previously chunks could be simultaneously created for the same
partition_id and a start_time and end_time of both NULL. This
prevents such bugs bug adding additional unique constraints and
locking the partition for chunk creation (as originally intended).
2017-03-24 12:12:07 -04:00
Rob Kiefer
ee3ad4678d Rename iobeamdb to TimescaleDB 2017-03-06 11:06:49 -05:00
Erik Nordström
eebd9bbbc1 Use native scan for chunks.
The chunk catalog table is now scanned with a native
scan rather than SPI call.

The scanner module is also updated with the option of
of taking locks on found tuples. In the case of chunk
scanning, chunks are typically returned with a share
lock on the tuple.
2017-03-02 12:25:00 +01:00
Erik Nordström
1daec06ce6 Use native scans for partition epochs and partitions.
This patch refactors the code to use native heap/index scans for
finding partition epochs and partitions. It also moves the
partitioning-related code and data structures to partitioning.{c,h}.
2017-03-02 12:25:00 +01:00
Matvey Arye
67ad21ee36 Cache hypertable metadata information for faster inserts.
Add caches for hypertable metadata to make it faster to map
INSERT rows to the chunk they should go into.
2017-03-02 12:24:53 +01:00
Erik Nordström
c09f6013fa Add number of partitions to partition_epoch table.
There are two reasons for adding the partition count to
the partition_epoch table:

* It makes the partition_epoch more self-describing as
  it makes it easy to see how many partitions are
  in the current epoch as well as past ones.
* It simplifies native code that can read the partition
  epoch, allocate memory for the right number of partitions,
  and finally scan the partition table filling in each entry.
2017-02-28 20:07:32 +01:00
Matvey Arye
f12a880d8d prepare hypertable_info plan 2017-02-07 17:09:08 -05: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
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
Matvey Arye
3c72689664 Finishing refactor TODOs & Formatting. Placement and cross-epoch queries. 2016-11-22 16:49:44 -05:00
Matvey Arye
939a4008ad Cleanup after refactor 2016-11-22 16:42:19 -05:00
Matvey Arye
bfcb25642e added meta table and communication from data nodes to meta 2016-11-22 16:41:27 -05:00
Matvey Arye
42ee7c8586 starting refactor of clustering and naming logic
This fix allows more flexible placement of tables on a node; better
and more flexible logic for remote placement of chunks on nodes.
2016-11-22 16:41:27 -05:00
Matvey Arye
a075899beb test and bug fixes; getting rid of jinja2 2016-10-26 17:02:08 -04:00
Matvey Arye
d300471c86 move cluster fdw setup inside core 2016-10-26 14:43:04 -04:00
Matvey Arye
59cc706bda add logic for creating data tables and indexes 2016-10-22 22:04:09 -04:00
Matvey Arye
82a845cf40 checkpoint in redoing cluster managment logic 2016-10-20 14:19:58 -04:00