Commit Graph

5257 Commits (testing)

Author SHA1 Message Date
Önder Kalacı a55287411b Merge pull request #332 from citusdata/bugfix/memory_context_leak
Remove unnecessary memory context switch on the planner
2016-02-12 11:13:12 -08:00
Onder Kalaci 0a6839e544 Perform distributed planning in the calling memory context
Previously we used, for historical reasons, MessageContext.
That is problematic if a single message from the client
causes a lot of statements to be planned. E.g. for the
copy_to_distributed_table script one insert statement
is planned for each row inserted via COPY, and only freed
when COPY has finished.
2016-02-12 20:50:40 +02:00
Jason Petersen b1ef2e59a2 Merge pull request #331 from citusdata/feature-permit_dml_to_append_tables#321
Allow DML commands on append-partitioned tables

cr: @lithp
2016-02-12 11:24:06 -07:00
Jason Petersen 5028f61a47 Merge pull request #328 from citusdata/feature-fix_varchar#201
Handle hash-partitioned aliased data types

cr: @marcocitus
2016-02-12 10:04:57 -07:00
Jason Petersen 6f308c5e2d
Allow DML commands on append-partitioned tables
This entirely removes any restriction on the type of partitioning
during DML planning and execution. Though there aren't actually any
technical limitations preventing DML commands against append- (or even
range-) partitioned tables, we had initially forbidden this, as any
future stage operation could cause shards to overlap, banning all
subsequent DML operations to partition values contained within more
than one shards. This ended up mostly restricting us, so we're now
removing that restriction.
2016-02-11 16:09:35 -07:00
Jason Petersen d164305929
Handle hash-partitioned aliased data types
When two data types have the same binary representation, PostgreSQL may
add an implicit coercion between them by wrapping a node in a relabel
type. This wrapper signals that the wrapped value is completely binary
compatible with the designated "final type" of the relabel node. As an
example, the varchar type is often relabeled to text, since functions
provided for use with text (comparisons, hashes, etc.) are completely
compatible with varchar as well.

The hash-partitioned codepath contains functions that verify queries
actually contain an equality constraint on the partition column, but
those functions expect such constraints to be comparison operations
between a Var and Const. The RelabelType wrapper node causes these
functions to always return false, which bypasses shard pruning.
2016-02-11 13:50:43 -07:00
Onder Kalaci 136306a1fe Initial commit of Citus 5.0 2016-02-11 04:05:32 +02:00