Hi Adam,
This approach could be used to pinpoint the first stripe for the query filter range. However, there is another way to achieve this without changin cstore.
PG10 has introduced declarative partitioning, where you can create a master table and partition it on a column or set of columns. a cstore table could be used as a partition of a master table. This way, query would be forwarded to only related cstore tables.
I have experimented with this approach it generally works with few caveats
- application needs to create cstore_fdw partitions manually. it may be automated, need to verify this.
- postgres does not forward inserts into foreign table partitions, therefore you would have to insert into partitions directly. Your application/script needs to know where it is actually inserting.
One good side effect of this approach is, if you are partitioning on timestamp field, you can retire old data in cstore table by just detaching the partition and dropping the cstore table.
Would this work for you ?
Murat