column table: set compress/nocompress support

This commit is contained in:
wuyuechuan
2022-08-08 20:24:54 +08:00
parent 6306c66888
commit 57c6c17dd8
4 changed files with 30 additions and 1 deletions

View File

@ -776,6 +776,7 @@ inline static bool CStoreSupportATCmd(AlterTableType cmdtype)
case AT_ColumnDefault:
case AT_SetStatistics:
case AT_AddStatistics:
case AT_SET_COMPRESS:
case AT_DeleteStatistics:
case AT_SetTableSpace:
case AT_SetPartitionTableSpace:

View File

@ -0,0 +1,18 @@
create schema alter_ctable_compress;
set search_path='alter_ctable_compress';
create table test1(id int) with (orientation='column', compression=yes);
create table test2(id int) with (orientation='column', compression=no);
alter table test1 set nocompress;
alter table test2 set compress;
insert into test1 select generate_series(1,50000);
insert into test2 select generate_series(1,50000);
select pg_table_size('test1') > pg_table_size('test2') as t;
t
---
t
(1 row)
drop schema alter_ctable_compress cascade;
NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to table test1
drop cascades to table test2

View File

@ -921,5 +921,5 @@ test: detail declare_multiple_variable
test: gs_dump_encrypt substr
test: composite_datum_record mysql_function b_comments
test: join_test_alias
test: join_test_alias alter_ctable_compress
test: ignore/ignore_type_transform ignore/ignore_not_null_constraints ignore/ignore_unique_constraints ignore/ignore_no_matched_partition

View File

@ -0,0 +1,10 @@
create schema alter_ctable_compress;
set search_path='alter_ctable_compress';
create table test1(id int) with (orientation='column', compression=yes);
create table test2(id int) with (orientation='column', compression=no);
alter table test1 set nocompress;
alter table test2 set compress;
insert into test1 select generate_series(1,50000);
insert into test2 select generate_series(1,50000);
select pg_table_size('test1') > pg_table_size('test2') as t;
drop schema alter_ctable_compress cascade;