gpdb
gpdb copied to clipboard
Auto create partition when insert tuples
Feature Request
Is your feature request related to a problem? Please describe: I have to make sure all corresponding partitions exist before inserting tuples into a partitioned table, otherwise, an error occurred. It`s inconvenient to do this.
for example: I create a table use following DDL
create table test(a int ,b char) partition by list(a) (partition one values(1));
if I execute SQL like insert into test values(2, 'a'), the error occurs like ERROR: no partition for partitioning key
Describe the feature you'd like to request: Hive can create partition automatically when inserting tuples,can Greenplum provides a similar feature?
such feature need to lock catalog for potential DDL operation within the same transaction. it is too heavy and would disallow parallel data loading. I'm afraid it is hard to consider in near future. closing it for now. thanks.
such feature need to lock catalog for potential DDL operation within the same transaction. it is too heavy and would disallow parallel data loading. I'm afraid it is hard to consider in near future. closing it for now. thanks.
I do not think the logic chain lock catalog --> disallow parallel data loading is correct.
I suppose you want to say lock on partitions.
This reminds me of a heavy lock on root partition when doing data expansion for partial tables.
Please keep this open and let R&D spike if having time.
Suppose following flow: insert into table -> no partition -> creation sub-partition table -> alter parent table in single transaction. I don't think it is possible without locking parent table...