10 Commits

Author SHA1 Message Date
gayyappan
7d3b4b5442 New size utils functions
Add hypertable_detailed_size , chunk_detailed_size,
hypertable_size functions.
Remove hypertable_relation_size,
hypertable_relation_size_pretty, and indexes_relation_size_pretty
Remove size information from hypertables view.
2020-07-29 15:30:39 -04:00
Joshua Lockerman
efb131dd6f Add missing tests discovered by Codecov 2
This commit adds tests for DATE, TIMESTAMP, and FLOAT compression and
decompression, NULL compression and decompression in dictionaries and
fixes a bug where the database would refuse to decompress DATEs. This
commit also removes the fallback allowing any binary compatible 8-byte
types to be compressed by our integer compressors as I believe I found
a bug in said fallback last time I reviewed it, and cannot recall what
the bug was. These can be re-added later, with appropriate tests.
2019-10-29 19:02:58 -04:00
Joshua Lockerman
405c65fb99 Add missing tests discovered by Codecov 1
This commit adds tests for:

1. Fixed-size pass-by-ref types.
2. Types whose alignment is greater than their size.
3. NULLs in segmentby columns

All of which were reported as missing by Codecov
2019-10-29 19:02:58 -04:00
Joshua Lockerman
91a73c3e17 Set statistics on compressed chunks
The statistics on segmentby and metadata columns are very important as
they affect the decompressed data a thousand-fold. Statistics on the
compressed columns are irrelevant, as the regular postgres planner
cannot understand the compressed columns. This commit sets the
statistics for compressed tables based on this, weighting the
uncompressed columns greatly, and the compressed columns not-at-all.
2019-10-29 19:02:58 -04:00
Matvey Arye
0f3e74215a Split segment meta min_max into two columns
This simplifies the code and the access to the min/max
metadata. Before we used a custom type, but now the min/max
are just the same type as the underlying column and stored as two
columns.

This also removes the custom type that was used before.
2019-10-29 19:02:58 -04:00
Joshua Lockerman
7b570b0dab Forward TRUNCATE from to compressed hypertable
TRUNCATEs of uncompressed hypertables should be forwarded to their
equivalent compressed tables. This currently does not occur for chunks.
2019-10-29 19:02:58 -04:00
Matvey Arye
b4a7108492 Integrate segment meta into compression
This commit integrates the SegmentMetaMinMax into the
compression logic. It adds metadata columns to the compressed table
and correctly sets it upon compression.

We also fix several errors with datum detoasting in SegmentMetaMinMax
2019-10-29 19:02:58 -04:00
Joshua Lockerman
8b273a5187 Fix flush when num-rows overflow
We should only free the segment-bys when we're changing groups not when
we've got too many rows to compress, in that case we'll need them.
2019-10-29 19:02:58 -04:00
Matvey Arye
dcc1d902d1 Add more compression tests
Adds several test features:
- Add a tests on compression of an altered hypertable
- Adds tests for transparent decompression in hypertables tests
- Add dump/restore in hypertable test
2019-10-29 19:02:58 -04:00
Matvey Arye
0059360522 Fix indexes during compression and decompression
This rebuilds indexes during compression and decompression. Previously,
indexes were not updated during these operations. We also fix
a small bug with orderby and segmentby handling of empty strings/
lists.

Finally, we add some more tests.
2019-10-29 19:02:58 -04:00