Closed congxuebin closed 4 months ago
I tried on old version cbdb, it is not as AO table(I don't see Access method ao_column), which could be the problem?
gpadmin=# create table split_tab5( a int, b int, c char(5), d boolean default true) with (appendonly=true, orientation=column )
distributed randomly
partition by list(b)
(
partition a values (1,2,3,4) with (appendonly = true),
partition b values(5,6,7,8) with (appendonly = true),
DEFAULT COLUMN ENCODING (compresstype=zlib,compresslevel=5)
);
CREATE TABLE
gpadmin=# \d+ split_tab5
Partitioned table "public.split_tab5"
Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description
--------+--------------+-----------+----------+---------+----------+-------------+--------------+-------------
a | integer | | | | plain | | |
b | integer | | | | plain | | |
c | character(5) | | | | extended | | |
d | boolean | | | true | plain | | |
Partition key: LIST (b)
Partitions: split_tab5_1_prt_a FOR VALUES IN (1, 2, 3, 4),
split_tab5_1_prt_b FOR VALUES IN (5, 6, 7, 8)
Distributed randomly
Hi @gfphoenix78,
This is a backlog issue reminder. Please rectify it at your earliest convenience. Thanks.
I tried on old version cbdb, it is not as AO table(I don't see Access method ao_column), which could be the problem?
gpadmin=# create table split_tab5( a int, b int, c char(5), d boolean default true) with (appendonly=true, orientation=column ) distributed randomly partition by list(b) ( partition a values (1,2,3,4) with (appendonly = true), partition b values(5,6,7,8) with (appendonly = true), DEFAULT COLUMN ENCODING (compresstype=zlib,compresslevel=5) ); CREATE TABLE gpadmin=# \d+ split_tab5 Partitioned table "public.split_tab5" Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description --------+--------------+-----------+----------+---------+----------+-------------+--------------+------------- a | integer | | | | plain | | | b | integer | | | | plain | | | c | character(5) | | | | extended | | | d | boolean | | | true | plain | | | Partition key: LIST (b) Partitions: split_tab5_1_prt_a FOR VALUES IN (1, 2, 3, 4), split_tab5_1_prt_b FOR VALUES IN (5, 6, 7, 8) Distributed randomly
According to mingli's comment, starting from PostgreSQL 14, the parent partitioned tables no longer support the WITH (storage options) clause. As a result, when you run the \d+ command on a parent table, you won't see the access_method attribute displayed.
create table mpp17761.split_tab5( a int, b int, c char(5), d boolean default true) with (appendonly=true, orientation=column )
distributed randomly
partition by list(b)
(
partition a values (1,2,3,4) with (appendonly = true),
partition b values(5,6,7,8) with (appendonly = true),
DEFAULT COLUMN ENCODING (compresstype=zlib,compresslevel=5)
);
Confirmed with Hao, in the following CREATE TABLE definition, setting (appendonly = true) in the partition definitions indicates that these partitions will be created as row-oriented tables. Therefore, the error stating that the ENCODING clause is only supported with column-oriented tables is as expected.
Thus I would change test case to resolve this issue. Closing this issue.
Cloudberry Database version
Expected:
Actual behavior:
What happened
As stated above,
What you think should happen instead
No response
How to reproduce
As stated above
Operating System
centos7
Anything else
No response
Are you willing to submit PR?
Code of Conduct