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

Strange output in query processing: ERROR - bogus varattno for OUTER_VAR var #428

Closed jd-zhang closed 3 years ago

jd-zhang commented 3 years ago

Issue migrated from trac ticket # 44

component: computing nodes | priority: minor | resolution: postpone

2021-04-15 17:00:12: @jd-zhang created the issue


CREATE TABLE tenk1 ( unique1 int4, unique2 int4, two int4, four int4, ten int4, twenty int4, hundred int4, thousand int4, twothousand int4, fivethous int4, tenthous int4, odd int4, even int4, stringu1 name, stringu2 name, string4 name ); CREATE TABLE INT4_TBL(f1 int4);

explain (costs off) select b.unique1 from tenk1 a join tenk1 b on a.unique1 = b.unique2 left join tenk1 c on b.unique1 # 42 and c.thousanda.thousand join int4_tbl i1 on b.thousand = f1 right join int4_tbl i2 on i2.f1 = b.tenthous order by 1; psql: ERROR: bogus varattno for OUTER_VAR var: 3

jd-zhang commented 3 years ago

2021-04-29 15:10:51: @jd-zhang commented


similar case:

drop table if exists mlparted; create table mlparted (a int, b int) partition by range (a, b); create table mlparted1 (b int not null, a int not null) partition by range ((b+0)); create table mlparted11 (like mlparted1); alter table mlparted1 attach partition mlparted11 for values from (2) to (5); alter table mlparted attach partition mlparted1 for values from (1, 2) to (1, 10); with ins (a, b, c) as (insert into mlparted (b, a) select s.a, 1 from generate_series(2, 39) s(a) returning tableoid::regclass, *) select a, b, min(c), max(c) from ins group by a, b order by 1;

tdb1=# with ins (a, b, c) as (insert into mlparted (b, a) select s.a, 1 from generate_series(2, 39) s(a) returning tableoid::regclass, *) select a, b, min(c), max(c) from ins group by a, b order by 1; WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8e178 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8e190 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8e1a8 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8f068 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8f080 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8f098 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8f0b0 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8f0c8 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8f0e0 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8f0f8 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8f110 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8f128 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: req size > alloc size for chunk 0x7f23f3b8f140 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bogus aset link in block 0x7f23f3b8e000, chunk 0x7f23f3b8f140 WARNING: problem in alloc set MessageContext: bad size 0 for chunk 0x7f23f3b8f180 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: req size > alloc size for chunk 0x7f23f3b8f198 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bogus aset link in block 0x7f23f3b8e000, chunk 0x7f23f3b8f198 WARNING: problem in alloc set MessageContext: req size > alloc size for chunk 0x7f23f3b8f1c0 in block 0x7f23f3b8e000 WARNING: problem in alloc set MessageContext: bogus aset link in block 0x7f23f3b8e000, chunk 0x7f23f3b8f1c0 ERROR: unexpected varattno 3 in expression to be mapped

this sometimes crash as well.

jd-zhang commented 3 years ago

2021-06-04 19:25:55: @david-zhao commented


the issue in the comment:1 is fixed; the 'EXPLAIN' issue at the beginning is not fixed yet and actually query results are correct,only the query plan printing is bogus.

jd-zhang commented 3 years ago

2021-06-07 10:33:33: @david-zhao

jd-zhang commented 3 years ago

2021-06-07 10:33:33: @david-zhao changed priority from major to minor

jd-zhang commented 3 years ago

2021-06-07 10:33:33: @david-zhao set resolution to postpone

jd-zhang commented 3 years ago

2021-06-07 10:33:33: @david-zhao changed severity from major to minor

jd-zhang commented 3 years ago

2021-06-07 10:33:33: @david-zhao changed status from assigned to closed