zettadb / kunlun

KunlunBase is a distributed relational database management system(RDBMS) with complete NewSQL capabilities and robust transaction ACID guarantees and is compatible with standard SQL. Applications which used PostgreSQL or MySQL can work with KunlunBase as-is without any code change or rebuild because KunlunBase supports both PostgreSQL and MySQL connection protocols and DML SQL grammars. MySQL DBAs can quickly work on a KunlunBase cluster because we use MySQL as storage nodes of KunlunBase. KunlunBase can elastically scale out as needed, and guarantees transaction ACID under error conditions, and KunlunBase fully passes TPC-C, TPC-H and TPC-DS test suites, so it not only support OLTP workloads but also OLAP workloads. Application developers can use KunlunBase to build IT systems that handles terabytes of data, without any effort on their part to implement data sharding, distributed transaction processing, distributed query processing, crash safety, high availability, strong consistency, horizontal scalability. All these powerful features are provided by KunlunBase. KunlunBase supports powerful and user friendly cluster management, monitor and provision features, can be readily used as DBaaS.
http://www.kunlunbase.com
Apache License 2.0
143 stars 20 forks source link

Update partition key should not succeed #694

Open jd-zhang opened 2 years ago

jd-zhang commented 2 years ago

Issue migrated from trac ticket # 563

component: computing nodes | priority: minor

2022-04-08 11:33:20: zhangjindong@zettadb.com created the issue


for kunlun:

postgres=# create table pt1(a text, b bigint) partition by range(a,b);
CREATE TABLE
postgres=# create table partpt1 partition of pt1 for values from ('b',10) to ('b', 20);
CREATE TABLE
postgres=# insert into pt1 values ('b', 11), ('b',12);
INSERT 0 2
postgres=# select * from pt1;
 a | b
---+----
 b | 11
 b | 12
(2 rows)
postgres=# update partpt1 set a='a';
UPDATE 2
postgres=# select * from pt1;
 a | b
---+----
 a | 11
 a | 12
(2 rows)

For official pg:

regress=# create table pt1(a text, b bigint) partition by range(a,b);
CREATE TABLE
regress=# create table partpt1 partition of pt1 for values from ('b',10) to ('b', 20);
CREATE TABLE
regress=# insert into pt1 values ('b', 11), ('b',12);
INSERT 0 2
regress=# select * from pt1;
 a | b
---+----
 b | 11
 b | 12
(2 rows)
regress=# update partpt1 set a='a';
ERROR:  new row for relation "partpt1" violates partition constraint
DETAIL:  Failing row contains (a, 11).
jd-zhang commented 2 years ago

2022-04-08 15:46:51: smith changed status from assigned to accepted