Commit graph

12 commits

Author SHA1 Message Date
Julien Rouhaud
db266cb458 Add real partitioning for sanity checks regressino tests. 2018-11-23 21:21:59 +01:00
Julien Rouhaud
7fb9dac6b5 Store the hypothetical partitions in a hash table.
Previous naive implementation was storing the hypothetical partitions in
a simple List, which would definitely not scale if many hypothetical
partitions are stored.

The partition's children oid are also now maintained in each hypoTable
entry, for performance reason too.

Some minor fixup too while at it.
2018-11-08 18:57:54 +01:00
yuzupy
ffcd3c7cc0 Add default partition tests to the regression test 2018-11-07 13:52:25 +09:00
Julien Rouhaud
e9cbdb0645 Add a hypopg_drop_table(oid) wrapper.
The underlying C function was already existing, I just forgot to add the
SQL wrapper.

The C function is modified to add an error if the function is called on
a non hypothetically partitioned table instead of silently doing
nothing, and add regression tests.
2018-11-04 13:42:07 +01:00
Julien Rouhaud
efb1ac04f3 Correctly handle childless hypothetical partitioned tables. 2018-11-04 13:17:27 +01:00
yuzupy
473749cc41 Forbit hypopg_analyze() on hypothetical hash partitioning 2018-10-10 11:58:04 +09:00
Julien Rouhaud
0f1e6bd9c5 Forbid unhandled DML on hypothatical partition 2018-10-07 12:55:38 +02:00
Julien Rouhaud
357ebdb2b3 Handle hypothetically partitioned table being dropped
Register a relcache callback, filter the relid list to keep only the one
corresponding to table that are hypothetically partitioned and
asynchronously process them.  We only care about table being dropped, so
in order to detect that we check if the relid we stored still correspond
to a table whose name is the same as the one we recorded when creating
the hypothetical objects.
2018-10-06 14:06:59 +02:00
yuzupy
ee5961a736 Add a test case of creating hypothetical partitions in different order 2018-10-04 11:53:26 +09:00
Julien Rouhaud
d865dcb5b2 Add sanity check on partition bounds.
Also add basic regression tests for this.  Thanks to yuzupy for spotting this.
2018-08-24 00:14:49 +02:00
yuzupy
edcd2c815e Modify hypo_expand_partitioned_entry() and the regression test for join queries using subpartitioning 2018-08-06 18:53:15 +09:00
Julien Rouhaud
37d6cb56ce Start adding some regression test for hypothetical partitioning.
This will fail on pg10- servers, but since hypothetical partitioning has
some feature not covered by regression tests, a full coverage of hypopg for all
pg versions will be done in other commit(s).
2018-07-27 12:39:34 +02:00