Erik Nordström 21efcce95c Refactor chunk table creation and unify constraint handling
This change is part of an effort to create a consistent way
of dealing with metadata catalog updates, which is currently
a mix of C API and INSERT/UPDATE/DELETE statements from SQL
code. This mix makes catalog handling unnecessarily complex as
there are multiple ways to update metadata, increasing the risk
of security issues with publically exposed SQL functions. It also
complicates things like cache invalidation, requiring different
mechanisms for C and SQL code. Catalog updates from SQL code
require triggers on metadata tables for cache invalidation that
do not work with native catalog updates.

The creation of chunks has been particularly messy in this regard,
making the code hard to follow. Especially the handling of a chunk's
constraints, where dimensional and other constraints were handled
differently. With this change, constraint handling is now consistent
across constraint types with a single API for updating metadata.

Reduce memory usage for out-of-order inserts

The chunk_result_relation_info should be put on the chunk memory
context. This will cause the rri constraint expr to also go onto
that context and be correctly freed when the chunk insert state
is destroyed.
2017-12-28 11:24:29 +01:00
..
2017-10-03 10:51:32 +02:00
2017-07-13 09:04:01 -04:00
2017-07-31 13:27:01 -04:00
2017-08-21 13:57:36 -04:00
2017-09-04 15:48:08 -04:00
2017-09-20 12:10:48 -04:00
2017-10-12 13:56:03 -04:00
2017-11-07 21:16:58 -05:00
2017-11-21 14:37:57 -05:00
2017-12-19 20:52:32 -05:00