diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 73ec3c2ff84..b1891057039 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -837,7 +837,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId, accessMethod = stmt->accessMethod; /* Only to allow access method when the partition is gp style partition */ - if (partitioned && Gp_role == GP_ROLE_DISPATCH && !stmt->partspec->gpPartDef) + if (partitioned && Gp_role != GP_ROLE_EXECUTE && !stmt->partspec->gpPartDef) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("specifying a table access method is not supported on a partitioned table"))); diff --git a/src/test/singlenode_regress/expected/AOCO_Compression.out b/src/test/singlenode_regress/expected/AOCO_Compression.out index a83b7ec502c..ba148d4745a 100644 --- a/src/test/singlenode_regress/expected/AOCO_Compression.out +++ b/src/test/singlenode_regress/expected/AOCO_Compression.out @@ -1803,49 +1803,49 @@ alter table co_wt_sub_partrle_type8192_1_2 add partition new_p values('C') WITH Table "public.co_wt_sub_partrle_type8192_1_2_1_prt_new_p_2_prt_3" Column | Type | Collation | Nullable | Default | Storage | Stats target | Compression Type | Compression Level | Block Size | Description --------+-----------------------------+-----------+----------+------------------------------------------------------------+----------+--------------+------------------+-------------------+------------+------------- - id | integer | | not null | nextval('co_wt_sub_partrle_type8192_1_2_id_seq'::regclass) | plain | | rle_type | 1 | 8192 | - a1 | integer | | | | plain | | rle_type | 1 | 8192 | - a2 | character(5) | | | | extended | | rle_type | 1 | 8192 | - a3 | numeric | | | | main | | rle_type | 1 | 8192 | - a4 | boolean | | | false | plain | | rle_type | 1 | 8192 | - a5 | character(1) | | | 'd'::bpchar | extended | | rle_type | 1 | 8192 | - a6 | text | | | | extended | | rle_type | 1 | 8192 | - a7 | timestamp without time zone | | | | plain | | rle_type | 1 | 8192 | - a8 | character varying(705) | | | | extended | | rle_type | 1 | 8192 | - a9 | bigint | | | | plain | | rle_type | 1 | 8192 | - a10 | date | | | | plain | | rle_type | 1 | 8192 | - a11 | character varying(600) | | | | extended | | rle_type | 1 | 8192 | - a12 | text | | | | extended | | rle_type | 1 | 8192 | - a13 | numeric | | | | main | | rle_type | 1 | 8192 | - a14 | real | | | | plain | | rle_type | 1 | 8192 | - a15 | bigint | | | | plain | | rle_type | 1 | 8192 | - a16 | integer | | | | plain | | rle_type | 1 | 8192 | - a17 | bytea | | | | extended | | rle_type | 1 | 8192 | - a18 | timestamp with time zone | | | | plain | | rle_type | 1 | 8192 | - a19 | time with time zone | | | | plain | | rle_type | 1 | 8192 | - a20 | path | | | | extended | | rle_type | 1 | 8192 | - a21 | box | | | | plain | | rle_type | 1 | 8192 | - a22 | macaddr | | | | plain | | rle_type | 1 | 8192 | - a23 | interval | | | | plain | | rle_type | 1 | 8192 | - a24 | character varying(800) | | | | extended | | rle_type | 1 | 8192 | - a25 | lseg | | | | plain | | rle_type | 1 | 8192 | - a26 | point | | | | plain | | rle_type | 1 | 8192 | - a27 | double precision | | | | plain | | rle_type | 1 | 8192 | - a28 | circle | | | | plain | | rle_type | 1 | 8192 | - a29 | integer | | | | plain | | rle_type | 1 | 8192 | - a30 | numeric(8,0) | | | | main | | rle_type | 1 | 8192 | - a31 | polygon | | | | extended | | rle_type | 1 | 8192 | - a32 | date | | | | plain | | rle_type | 1 | 8192 | - a33 | real | | | | plain | | rle_type | 1 | 8192 | - a34 | money | | | | plain | | rle_type | 1 | 8192 | - a35 | cidr | | | | main | | rle_type | 1 | 8192 | - a36 | inet | | | | main | | rle_type | 1 | 8192 | - a37 | time without time zone | | | | plain | | rle_type | 1 | 8192 | - a38 | text | | | | extended | | rle_type | 1 | 8192 | - a39 | bit(1) | | | | extended | | rle_type | 1 | 8192 | - a40 | bit varying(5) | | | | extended | | rle_type | 1 | 8192 | - a41 | smallint | | | | plain | | rle_type | 1 | 8192 | - a42 | integer | | | | plain | | rle_type | 1 | 8192 | + id | integer | | not null | nextval('co_wt_sub_partrle_type8192_1_2_id_seq'::regclass) | plain | | zlib | 1 | 32768 | + a1 | integer | | | | plain | | zlib | 1 | 32768 | + a2 | character(5) | | | | extended | | zlib | 1 | 32768 | + a3 | numeric | | | | main | | zlib | 1 | 32768 | + a4 | boolean | | | false | plain | | zlib | 1 | 32768 | + a5 | character(1) | | | 'd'::bpchar | extended | | zlib | 1 | 32768 | + a6 | text | | | | extended | | zlib | 1 | 32768 | + a7 | timestamp without time zone | | | | plain | | zlib | 1 | 32768 | + a8 | character varying(705) | | | | extended | | zlib | 1 | 32768 | + a9 | bigint | | | | plain | | zlib | 1 | 32768 | + a10 | date | | | | plain | | zlib | 1 | 32768 | + a11 | character varying(600) | | | | extended | | zlib | 1 | 32768 | + a12 | text | | | | extended | | zlib | 1 | 32768 | + a13 | numeric | | | | main | | zlib | 1 | 32768 | + a14 | real | | | | plain | | zlib | 1 | 32768 | + a15 | bigint | | | | plain | | zlib | 1 | 32768 | + a16 | integer | | | | plain | | zlib | 1 | 32768 | + a17 | bytea | | | | extended | | zlib | 1 | 32768 | + a18 | timestamp with time zone | | | | plain | | zlib | 1 | 32768 | + a19 | time with time zone | | | | plain | | zlib | 1 | 32768 | + a20 | path | | | | extended | | zlib | 1 | 32768 | + a21 | box | | | | plain | | zlib | 1 | 32768 | + a22 | macaddr | | | | plain | | zlib | 1 | 32768 | + a23 | interval | | | | plain | | zlib | 1 | 32768 | + a24 | character varying(800) | | | | extended | | zlib | 1 | 32768 | + a25 | lseg | | | | plain | | zlib | 1 | 32768 | + a26 | point | | | | plain | | zlib | 1 | 32768 | + a27 | double precision | | | | plain | | zlib | 1 | 32768 | + a28 | circle | | | | plain | | zlib | 1 | 32768 | + a29 | integer | | | | plain | | zlib | 1 | 32768 | + a30 | numeric(8,0) | | | | main | | zlib | 1 | 32768 | + a31 | polygon | | | | extended | | zlib | 1 | 32768 | + a32 | date | | | | plain | | zlib | 1 | 32768 | + a33 | real | | | | plain | | zlib | 1 | 32768 | + a34 | money | | | | plain | | zlib | 1 | 32768 | + a35 | cidr | | | | main | | zlib | 1 | 32768 | + a36 | inet | | | | main | | zlib | 1 | 32768 | + a37 | time without time zone | | | | plain | | zlib | 1 | 32768 | + a38 | text | | | | extended | | zlib | 1 | 32768 | + a39 | bit(1) | | | | extended | | zlib | 1 | 32768 | + a40 | bit varying(5) | | | | extended | | zlib | 1 | 32768 | + a41 | smallint | | | | plain | | zlib | 1 | 32768 | + a42 | integer | | | | plain | | zlib | 1 | 32768 | Partition of: co_wt_sub_partrle_type8192_1_2_1_prt_new_p FOR VALUES FROM (1001) TO (2001) Partition constraint: ((a2 IS NOT NULL) AND (a2 = 'C '::character(5)) AND (a1 IS NOT NULL) AND (a1 >= 1001) AND (a1 < 2001)) Checksum: t diff --git a/src/test/singlenode_regress/expected/partition.out b/src/test/singlenode_regress/expected/partition.out index 24a9e8ff161..6c4ecee8ed1 100755 --- a/src/test/singlenode_regress/expected/partition.out +++ b/src/test/singlenode_regress/expected/partition.out @@ -2294,6 +2294,7 @@ Partitions: "sg_cal_event_silvertail_hour_1_prt_P2009041607" FOR VALUES FROM ('T "sg_cal_event_silvertail_hour_1_prt_P2009041608" FOR VALUES FROM ('Thu Apr 16 08:00:00 2009') TO ('Thu Apr 16 09:00:00 2009'), sg_cal_event_silvertail_hour_1_prt_p2009042907 FOR VALUES FROM ('Wed Apr 29 07:00:00 2009') TO ('Wed Apr 29 08:00:00 2009'), sg_cal_event_silvertail_hour_1_prt_st_default DEFAULT +Options: compresslevel=5 \d+ sg_cal_event_silvertail_hour_1_prt_P2009042907 Table "public.sg_cal_event_silvertail_hour_1_prt_p2009042907" @@ -3433,116 +3434,116 @@ select * from pg_partition_tree('mpp5992'); select relname, relam, pg_get_expr(relpartbound, oid) from pg_class where relname like 'mpp5992%'; relname | relam | pg_get_expr --------------------------------------------------+-------+-------------------------------------------------- - mpp5992 | 0 | - mpp5992_1_prt_1 | 0 | FOR VALUES FROM ('01-01-2007') TO ('01-01-2008') - mpp5992_1_prt_1_2_prt_l1 | 0 | FOR VALUES IN (1, 2, 3, 4, 5) - mpp5992_1_prt_1_2_prt_l1_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992 | 7166 | + mpp5992_1_prt_1 | 7166 | FOR VALUES FROM ('01-01-2007') TO ('01-01-2008') + mpp5992_1_prt_1_2_prt_l1 | 7166 | FOR VALUES IN (1, 2, 3, 4, 5) + mpp5992_1_prt_1_2_prt_l1_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') mpp5992_1_prt_1_2_prt_l1_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_1_2_prt_l1_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_1_2_prt_l1_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_1_2_prt_l1_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') mpp5992_1_prt_1_2_prt_l1_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_1_2_prt_l1_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_1_2_prt_l2 | 0 | FOR VALUES IN (6, 7, 8, 9, 10) - mpp5992_1_prt_1_2_prt_l2_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_1_2_prt_l2 | 7166 | FOR VALUES IN (6, 7, 8, 9, 10) + mpp5992_1_prt_1_2_prt_l2_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') mpp5992_1_prt_1_2_prt_l2_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_1_2_prt_l2_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_1_2_prt_l2_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_1_2_prt_l2_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') mpp5992_1_prt_1_2_prt_l2_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_1_2_prt_l2_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_2 | 0 | FOR VALUES FROM ('01-01-2008') TO ('01-01-2009') - mpp5992_1_prt_2_2_prt_l1 | 0 | FOR VALUES IN (1, 2, 3, 4, 5) - mpp5992_1_prt_2_2_prt_l1_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_2 | 7166 | FOR VALUES FROM ('01-01-2008') TO ('01-01-2009') + mpp5992_1_prt_2_2_prt_l1 | 7166 | FOR VALUES IN (1, 2, 3, 4, 5) + mpp5992_1_prt_2_2_prt_l1_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') mpp5992_1_prt_2_2_prt_l1_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_2_2_prt_l1_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_2_2_prt_l1_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_2_2_prt_l1_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') mpp5992_1_prt_2_2_prt_l1_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_2_2_prt_l1_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_2_2_prt_l2 | 0 | FOR VALUES IN (6, 7, 8, 9, 10) - mpp5992_1_prt_2_2_prt_l2_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_2_2_prt_l2 | 7166 | FOR VALUES IN (6, 7, 8, 9, 10) + mpp5992_1_prt_2_2_prt_l2_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') mpp5992_1_prt_2_2_prt_l2_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_2_2_prt_l2_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_2_2_prt_l2_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_2_2_prt_l2_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') mpp5992_1_prt_2_2_prt_l2_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_2_2_prt_l2_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_3 | 0 | FOR VALUES FROM ('01-01-2009') TO ('01-01-2010') - mpp5992_1_prt_3_2_prt_l1 | 0 | FOR VALUES IN (1, 2, 3, 4, 5) - mpp5992_1_prt_3_2_prt_l1_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_3 | 7166 | FOR VALUES FROM ('01-01-2009') TO ('01-01-2010') + mpp5992_1_prt_3_2_prt_l1 | 7166 | FOR VALUES IN (1, 2, 3, 4, 5) + mpp5992_1_prt_3_2_prt_l1_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') mpp5992_1_prt_3_2_prt_l1_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_3_2_prt_l1_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_3_2_prt_l1_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_3_2_prt_l1_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') mpp5992_1_prt_3_2_prt_l1_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_3_2_prt_l1_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_3_2_prt_l2 | 0 | FOR VALUES IN (6, 7, 8, 9, 10) - mpp5992_1_prt_3_2_prt_l2_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_3_2_prt_l2 | 7166 | FOR VALUES IN (6, 7, 8, 9, 10) + mpp5992_1_prt_3_2_prt_l2_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') mpp5992_1_prt_3_2_prt_l2_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_3_2_prt_l2_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_3_2_prt_l2_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_3_2_prt_l2_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') mpp5992_1_prt_3_2_prt_l2_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_3_2_prt_l2_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_foo1 | 0 | FOR VALUES FROM ('01-01-2011') TO ('01-01-2012') - mpp5992_1_prt_foo1_2_prt_l1 | 0 | FOR VALUES IN (1, 2, 3) - mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') - mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll1_4_prt_lll1 | 2 | FOR VALUES IN ('M') - mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll1_4_prt_lll2 | 2 | FOR VALUES IN ('F') - mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll2 | 0 | FOR VALUES IN ('QA') - mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll2_4_prt_lll1 | 2 | FOR VALUES IN ('M') - mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll2_4_prt_lll2 | 2 | FOR VALUES IN ('F') - mpp5992_1_prt_foo1_2_prt_l2 | 0 | FOR VALUES IN (4, 5, 6) - mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') - mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll1_4_prt_lll1 | 2 | FOR VALUES IN ('M') - mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll1_4_prt_lll2 | 2 | FOR VALUES IN ('F') - mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll2 | 0 | FOR VALUES IN ('QA') - mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll2_4_prt_lll1 | 2 | FOR VALUES IN ('M') - mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll2_4_prt_lll2 | 2 | FOR VALUES IN ('F') - mpp5992_1_prt_foo1_2_prt_l3 | 0 | FOR VALUES IN (7, 8, 9, 10) - mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') - mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll1_4_prt_lll1 | 2 | FOR VALUES IN ('M') - mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll1_4_prt_lll2 | 2 | FOR VALUES IN ('F') - mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll2 | 0 | FOR VALUES IN ('QA') - mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll2_4_prt_lll1 | 2 | FOR VALUES IN ('M') - mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll2_4_prt_lll2 | 2 | FOR VALUES IN ('F') - mpp5992_1_prt_foo2 | 0 | FOR VALUES FROM ('01-01-2012') TO ('01-01-2013') - mpp5992_1_prt_foo2_2_prt_l1 | 0 | FOR VALUES IN (1, 2, 3) - mpp5992_1_prt_foo2_2_prt_l1_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_foo1 | 7166 | FOR VALUES FROM ('01-01-2011') TO ('01-01-2012') + mpp5992_1_prt_foo1_2_prt_l1 | 7166 | FOR VALUES IN (1, 2, 3) + mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') + mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') + mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') + mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') + mpp5992_1_prt_foo1_2_prt_l1_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') + mpp5992_1_prt_foo1_2_prt_l2 | 7166 | FOR VALUES IN (4, 5, 6) + mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') + mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') + mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') + mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') + mpp5992_1_prt_foo1_2_prt_l2_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') + mpp5992_1_prt_foo1_2_prt_l3 | 7166 | FOR VALUES IN (7, 8, 9, 10) + mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') + mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') + mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') + mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') + mpp5992_1_prt_foo1_2_prt_l3_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') + mpp5992_1_prt_foo2 | 7166 | FOR VALUES FROM ('01-01-2012') TO ('01-01-2013') + mpp5992_1_prt_foo2_2_prt_l1 | 7166 | FOR VALUES IN (1, 2, 3) + mpp5992_1_prt_foo2_2_prt_l1_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') mpp5992_1_prt_foo2_2_prt_l1_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_foo2_2_prt_l1_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_foo2_2_prt_l1_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_foo2_2_prt_l1_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') mpp5992_1_prt_foo2_2_prt_l1_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_foo2_2_prt_l1_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_foo2_2_prt_l2 | 0 | FOR VALUES IN (4, 5, 6) - mpp5992_1_prt_foo2_2_prt_l2_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_foo2_2_prt_l2 | 7166 | FOR VALUES IN (4, 5, 6) + mpp5992_1_prt_foo2_2_prt_l2_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') mpp5992_1_prt_foo2_2_prt_l2_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_foo2_2_prt_l2_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_foo2_2_prt_l2_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_foo2_2_prt_l2_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') mpp5992_1_prt_foo2_2_prt_l2_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_foo2_2_prt_l2_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_foo2_2_prt_l3 | 0 | FOR VALUES IN (7, 8, 9, 10) - mpp5992_1_prt_foo2_2_prt_l3_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_foo2_2_prt_l3 | 7166 | FOR VALUES IN (7, 8, 9, 10) + mpp5992_1_prt_foo2_2_prt_l3_3_prt_ll1 | 7166 | FOR VALUES IN ('Engineering') mpp5992_1_prt_foo2_2_prt_l3_3_prt_ll1_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_foo2_2_prt_l3_3_prt_ll1_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_foo2_2_prt_l3_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_foo2_2_prt_l3_3_prt_ll2 | 7166 | FOR VALUES IN ('QA') mpp5992_1_prt_foo2_2_prt_l3_3_prt_ll2_4_prt_lll1 | 7166 | FOR VALUES IN ('M') mpp5992_1_prt_foo2_2_prt_l3_3_prt_ll2_4_prt_lll2 | 7166 | FOR VALUES IN ('F') - mpp5992_1_prt_foo3 | 0 | FOR VALUES FROM ('01-01-2013') TO ('01-01-2014') - mpp5992_1_prt_foo3_2_prt_l1 | 0 | FOR VALUES IN (1, 2, 3) - mpp5992_1_prt_foo3_2_prt_l1_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_foo3 | 7024 | FOR VALUES FROM ('01-01-2013') TO ('01-01-2014') + mpp5992_1_prt_foo3_2_prt_l1 | 7024 | FOR VALUES IN (1, 2, 3) + mpp5992_1_prt_foo3_2_prt_l1_3_prt_ll1 | 7024 | FOR VALUES IN ('Engineering') mpp5992_1_prt_foo3_2_prt_l1_3_prt_ll1_4_prt_lll1 | 7024 | FOR VALUES IN ('M') mpp5992_1_prt_foo3_2_prt_l1_3_prt_ll1_4_prt_lll2 | 7024 | FOR VALUES IN ('F') - mpp5992_1_prt_foo3_2_prt_l1_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_foo3_2_prt_l1_3_prt_ll2 | 7024 | FOR VALUES IN ('QA') mpp5992_1_prt_foo3_2_prt_l1_3_prt_ll2_4_prt_lll1 | 7024 | FOR VALUES IN ('M') mpp5992_1_prt_foo3_2_prt_l1_3_prt_ll2_4_prt_lll2 | 7024 | FOR VALUES IN ('F') - mpp5992_1_prt_foo3_2_prt_l2 | 0 | FOR VALUES IN (4, 5, 6) - mpp5992_1_prt_foo3_2_prt_l2_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_foo3_2_prt_l2 | 7024 | FOR VALUES IN (4, 5, 6) + mpp5992_1_prt_foo3_2_prt_l2_3_prt_ll1 | 7024 | FOR VALUES IN ('Engineering') mpp5992_1_prt_foo3_2_prt_l2_3_prt_ll1_4_prt_lll1 | 7024 | FOR VALUES IN ('M') mpp5992_1_prt_foo3_2_prt_l2_3_prt_ll1_4_prt_lll2 | 7024 | FOR VALUES IN ('F') - mpp5992_1_prt_foo3_2_prt_l2_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_foo3_2_prt_l2_3_prt_ll2 | 7024 | FOR VALUES IN ('QA') mpp5992_1_prt_foo3_2_prt_l2_3_prt_ll2_4_prt_lll1 | 7024 | FOR VALUES IN ('M') mpp5992_1_prt_foo3_2_prt_l2_3_prt_ll2_4_prt_lll2 | 7024 | FOR VALUES IN ('F') - mpp5992_1_prt_foo3_2_prt_l3 | 0 | FOR VALUES IN (7, 8, 9, 10) - mpp5992_1_prt_foo3_2_prt_l3_3_prt_ll1 | 0 | FOR VALUES IN ('Engineering') + mpp5992_1_prt_foo3_2_prt_l3 | 7024 | FOR VALUES IN (7, 8, 9, 10) + mpp5992_1_prt_foo3_2_prt_l3_3_prt_ll1 | 7024 | FOR VALUES IN ('Engineering') mpp5992_1_prt_foo3_2_prt_l3_3_prt_ll1_4_prt_lll1 | 7024 | FOR VALUES IN ('M') mpp5992_1_prt_foo3_2_prt_l3_3_prt_ll1_4_prt_lll2 | 7024 | FOR VALUES IN ('F') - mpp5992_1_prt_foo3_2_prt_l3_3_prt_ll2 | 0 | FOR VALUES IN ('QA') + mpp5992_1_prt_foo3_2_prt_l3_3_prt_ll2 | 7024 | FOR VALUES IN ('QA') mpp5992_1_prt_foo3_2_prt_l3_3_prt_ll2_4_prt_lll1 | 7024 | FOR VALUES IN ('M') mpp5992_1_prt_foo3_2_prt_l3_3_prt_ll2_4_prt_lll2 | 7024 | FOR VALUES IN ('F') (112 rows) diff --git a/src/test/singlenode_regress/expected/partition_storage.out b/src/test/singlenode_regress/expected/partition_storage.out index fdf3c32c19e..ffe53a35147 100644 --- a/src/test/singlenode_regress/expected/partition_storage.out +++ b/src/test/singlenode_regress/expected/partition_storage.out @@ -557,10 +557,10 @@ NOTICE: table "pt_ao_tab_rng" does not exist, skipping alter table pt_ao_tab_rng add partition co start(31) end(35) with (appendonly=true,orientation=column); select c.oid::regclass, relkind, amname, reloptions from pg_class c left join pg_am am on am.oid = c.relam where c.oid in ( select oid from pg_class where relname in ( 'pt_ao_tab_rng_1_prt_heap', 'pt_ao_tab_rng_1_prt_ao','pt_ao_tab_rng_1_prt_co')); - oid | relkind | amname | reloptions ---------------------------+---------+-----------+------------ + oid | relkind | amname | reloptions +--------------------------+---------+-----------+------------------------------------- pt_ao_tab_rng_1_prt_heap | r | heap | - pt_ao_tab_rng_1_prt_ao | r | ao_row | + pt_ao_tab_rng_1_prt_ao | r | ao_row | {compresstype=zlib,compresslevel=1} pt_ao_tab_rng_1_prt_co | r | ao_column | (3 rows) @@ -570,13 +570,13 @@ NOTICE: table "pt_ao_tab_rng" does not exist, skipping alter table pt_ao_tab_rng split partition co at (33) into (partition co1,partition co2); select c.oid::regclass, relkind, amname, reloptions from pg_class c left join pg_am am on am.oid = c.relam where c.oid in ( select oid from pg_class where relname in ( 'pt_ao_tab_rng_1_prt_heap1' ,'pt_ao_tab_rng_1_prt_heap2' ,'pt_ao_tab_rng_1_prt_ao1', 'pt_ao_tab_rng_1_prt_ao2', 'pt_ao_tab_rng_1_prt_co1', 'pt_ao_tab_rng_1_prt_co2')); - oid | relkind | amname | reloptions ----------------------------+---------+-----------+------------ + oid | relkind | amname | reloptions +---------------------------+---------+-----------+------------------------------------- pt_ao_tab_rng_1_prt_heap1 | r | heap | pt_ao_tab_rng_1_prt_heap2 | r | heap | - pt_ao_tab_rng_1_prt_ao2 | r | ao_row | + pt_ao_tab_rng_1_prt_ao2 | r | ao_row | {compresstype=zlib,compresslevel=1} pt_ao_tab_rng_1_prt_co2 | r | ao_column | - pt_ao_tab_rng_1_prt_ao1 | r | ao_row | + pt_ao_tab_rng_1_prt_ao1 | r | ao_row | {compresstype=zlib,compresslevel=1} pt_ao_tab_rng_1_prt_co1 | r | ao_column | (6 rows) @@ -624,14 +624,15 @@ Distributed by: (a) d | integer | | | | plain | | e | numeric | | | | main | | success | boolean | | | | plain | | -Compression Type: None -Compression Level: 0 +Compression Type: zlib +Compression Level: 1 Block Size: 32768 Checksum: t Indexes: "pt_ao_tab_rng_1_prt_ao1_a_idx" btree (a) WHERE c > 10 "pt_ao_tab_rng_1_prt_ao1_upper_idx" btree (upper(b)) Distributed by: (a) +Options: compresstype=zlib, compresslevel=1 \d+ heap_can Table "public.heap_can" @@ -680,11 +681,11 @@ NOTICE: table "pt_co_tab_rng" does not exist, skipping alter table pt_co_tab_rng add partition co start(31) end(35) with (appendonly=true,orientation=column); select c.oid::regclass, relkind, amname, reloptions from pg_class c left join pg_am am on am.oid = c.relam where c.oid in ( select oid from pg_class where relname in ( 'pt_co_tab_rng_1_prt_heap', 'pt_co_tab_rng_1_prt_ao','pt_co_tab_rng_1_prt_co')); - oid | relkind | amname | reloptions ---------------------------+---------+-----------+------------ + oid | relkind | amname | reloptions +--------------------------+---------+-----------+------------------------------------- pt_co_tab_rng_1_prt_heap | r | heap | pt_co_tab_rng_1_prt_ao | r | ao_row | - pt_co_tab_rng_1_prt_co | r | ao_column | + pt_co_tab_rng_1_prt_co | r | ao_column | {compresstype=zlib,compresslevel=1} (3 rows) --Split partition @@ -693,14 +694,14 @@ NOTICE: table "pt_co_tab_rng" does not exist, skipping alter table pt_co_tab_rng split partition co at (33) into (partition co1,partition co2); select c.oid::regclass, relkind, amname, reloptions from pg_class c left join pg_am am on am.oid = c.relam where c.oid in ( select oid from pg_class where relname in ( 'pt_co_tab_rng_1_prt_heap1' ,'pt_co_tab_rng_1_prt_heap2' ,'pt_co_tab_rng_1_prt_ao1', 'pt_co_tab_rng_1_prt_ao2', 'pt_co_tab_rng_1_prt_co1', 'pt_co_tab_rng_1_prt_co2')); - oid | relkind | amname | reloptions ----------------------------+---------+-----------+------------ + oid | relkind | amname | reloptions +---------------------------+---------+-----------+------------------------------------- pt_co_tab_rng_1_prt_heap1 | r | heap | pt_co_tab_rng_1_prt_heap2 | r | heap | pt_co_tab_rng_1_prt_ao1 | r | ao_row | pt_co_tab_rng_1_prt_ao2 | r | ao_row | - pt_co_tab_rng_1_prt_co1 | r | ao_column | - pt_co_tab_rng_1_prt_co2 | r | ao_column | + pt_co_tab_rng_1_prt_co1 | r | ao_column | {compresstype=zlib,compresslevel=1} + pt_co_tab_rng_1_prt_co2 | r | ao_column | {compresstype=zlib,compresslevel=1} (6 rows) --Exchange @@ -760,17 +761,18 @@ Distributed by: (a) Table "public.heap_can" Column | Type | Collation | Nullable | Default | Storage | Stats target | Compression Type | Compression Level | Block Size | Description ---------+---------+-----------+----------+---------+----------+--------------+------------------+-------------------+------------+------------- - a | integer | | | | plain | | none | 0 | 32768 | - b | text | | | | extended | | none | 0 | 32768 | - c | integer | | | | plain | | none | 0 | 32768 | - d | integer | | | | plain | | none | 0 | 32768 | - e | numeric | | | | main | | none | 0 | 32768 | - success | boolean | | | | plain | | none | 0 | 32768 | + a | integer | | | | plain | | zlib | 1 | 32768 | + b | text | | | | extended | | zlib | 1 | 32768 | + c | integer | | | | plain | | zlib | 1 | 32768 | + d | integer | | | | plain | | zlib | 1 | 32768 | + e | numeric | | | | main | | zlib | 1 | 32768 | + success | boolean | | | | plain | | zlib | 1 | 32768 | Checksum: t Indexes: "pt_co_tab_rng_1_prt_co1_a_idx" btree (a) WHERE c > 10 "pt_co_tab_rng_1_prt_co1_upper_idx" btree (upper(b)) Distributed by: (a) +Options: compresstype=zlib, compresslevel=1 -- Create more index indexes create index co_rng_idx3 on pt_co_tab_rng(c,d) where a = 40 OR a = 50; -- multicol indx