Small fixup after rebase on the master branch. Fixes test
output and function naming (even test functions should
have the ts_ not the tsl_ prefix for exported C functions).
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.
This commit contains all of the miscellaneous fixes needed to pass
pre-release tests. It:
1. Switches the custom type in tsl/tests/compression_segment_meta.sql
to determine its alignment and pass-by-ref'ness based on what
TIMESTAMPTZ has. This is needed due to the fact that 8-byte values
are pass-by-val in 64-bit platforms and pas-by-ref on 32-bit.
2. Marks some variables that are only used for assertions as
PG_USED_FOR_ASSERTS_ONLY
This commit pushes down quals or order_by columns to make
use of the SegmentMetaMinMax objects. Namely =,<,<=,>,>= quals
can now be pushed down.
We also remove filters from decompress node for quals that
have been pushed down and don't need a recheck.
This commit also changes tests to add more segment by and
order-by columns.
Finally, we rename segment meta accessor functions to be smaller
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
Add the type for min/max segment meta object. Segment metadata
objects keep metadata about data in segments (compressed rows).
The min/max variant keeps the min and max values inside the compressed
object. It will be used on compression order by columns to allow
queries that have quals on those columns to be able to exclude entire
segments if no uncompressed rows in the segment may match the qual.
We also add generalized infrastructure for datum serialization
/ deserialization for arbitrary types to and from memory as well
as binary strings.