Skip to content

Commit 0b780e3

Browse files
committed
Fix some test cases for pax
1 parent 12174a9 commit 0b780e3

21 files changed

Lines changed: 108 additions & 203 deletions

contrib/pax_storage/src/test/regress/expected/alter_table.out

Lines changed: 16 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,7 +2337,7 @@ select reltoastrelid <> 0 as has_toast_table
23372337
from pg_class where oid = 'test_storage'::regclass;
23382338
has_toast_table
23392339
-----------------
2340-
t
2340+
f
23412341
(1 row)
23422342

23432343
alter table test_storage alter a set storage plain;
@@ -2355,7 +2355,7 @@ select reltoastrelid <> 0 as has_toast_table
23552355
from pg_class where oid = 'test_storage'::regclass;
23562356
has_toast_table
23572357
-----------------
2358-
t
2358+
f
23592359
(1 row)
23602360

23612361
-- check STORAGE correctness
@@ -2845,44 +2845,6 @@ select * from my_locks order by 1;
28452845
alterlock | ShareUpdateExclusiveLock
28462846
(1 row)
28472847

2848-
commit;
2849-
begin; alter table alterlock set (fillfactor = 100);
2850-
select * from my_locks order by 1;
2851-
relname | max_lockmode
2852-
-----------+--------------------------
2853-
alterlock | ShareUpdateExclusiveLock
2854-
pg_toast | ShareUpdateExclusiveLock
2855-
(2 rows)
2856-
2857-
commit;
2858-
begin; alter table alterlock reset (fillfactor);
2859-
select * from my_locks order by 1;
2860-
relname | max_lockmode
2861-
-----------+--------------------------
2862-
alterlock | ShareUpdateExclusiveLock
2863-
pg_toast | ShareUpdateExclusiveLock
2864-
(2 rows)
2865-
2866-
commit;
2867-
begin; alter table alterlock set (toast.autovacuum_enabled = off);
2868-
WARNING: autovacuum is not supported in Cloudberry
2869-
select * from my_locks order by 1;
2870-
relname | max_lockmode
2871-
-----------+--------------------------
2872-
alterlock | ShareUpdateExclusiveLock
2873-
pg_toast | ShareUpdateExclusiveLock
2874-
(2 rows)
2875-
2876-
commit;
2877-
begin; alter table alterlock set (autovacuum_enabled = off);
2878-
WARNING: autovacuum is not supported in Cloudberry
2879-
select * from my_locks order by 1;
2880-
relname | max_lockmode
2881-
-----------+--------------------------
2882-
alterlock | ShareUpdateExclusiveLock
2883-
pg_toast | ShareUpdateExclusiveLock
2884-
(2 rows)
2885-
28862848
commit;
28872849
begin; alter table alterlock alter column f2 set (n_distinct = 1);
28882850
select * from my_locks order by 1;
@@ -2893,16 +2855,6 @@ select * from my_locks order by 1;
28932855

28942856
rollback;
28952857
-- test that mixing options with different lock levels works as expected
2896-
begin; alter table alterlock set (autovacuum_enabled = off, fillfactor = 80);
2897-
WARNING: autovacuum is not supported in Cloudberry
2898-
select * from my_locks order by 1;
2899-
relname | max_lockmode
2900-
-----------+--------------------------
2901-
alterlock | ShareUpdateExclusiveLock
2902-
pg_toast | ShareUpdateExclusiveLock
2903-
(2 rows)
2904-
2905-
commit;
29062858
begin; alter table alterlock alter column f2 set storage extended;
29072859
select * from my_locks order by 1;
29082860
relname | max_lockmode
@@ -2925,12 +2877,9 @@ create trigger ttdummy
29252877
for each row
29262878
execute procedure
29272879
ttdummy (1, 1);
2880+
ERROR: ON UPDATE triggers are not supported on append-only tables
29282881
select * from my_locks order by 1;
2929-
relname | max_lockmode
2930-
-----------+-----------------------
2931-
alterlock | ShareRowExclusiveLock
2932-
(1 row)
2933-
2882+
ERROR: current transaction is aborted, commands ignored until end of transaction block
29342883
rollback;
29352884
begin;
29362885
select * from my_locks order by 1;
@@ -3685,14 +3634,12 @@ SELECT r.relname || ' toast table', t.relkind, t.relpersistence FROM pg_class r
36853634
UNION ALL
36863635
SELECT r.relname ||' toast index', ri.relkind, ri.relpersistence FROM pg_class r join pg_class t ON t.oid = r.reltoastrelid JOIN pg_index i ON i.indrelid = t.oid JOIN pg_class ri ON ri.oid = i.indexrelid WHERE r.relname ~ '^logged1'
36873636
ORDER BY relname;
3688-
relname | relkind | relpersistence
3689-
---------------------+---------+----------------
3690-
logged1 | r | p
3691-
logged1 toast index | i | p
3692-
logged1 toast table | t | p
3693-
logged1_f1_seq | S | p
3694-
logged1_pkey | i | p
3695-
(5 rows)
3637+
relname | relkind | relpersistence
3638+
----------------+---------+----------------
3639+
logged1 | r | p
3640+
logged1_f1_seq | S | p
3641+
logged1_pkey | i | p
3642+
(3 rows)
36963643

36973644
CREATE TABLE logged2(f1 SERIAL PRIMARY KEY, f2 INTEGER REFERENCES logged1); -- foreign key
36983645
CREATE TABLE logged3(f1 SERIAL PRIMARY KEY, f2 INTEGER REFERENCES logged3); -- self-referencing foreign key
@@ -3708,14 +3655,12 @@ SELECT r.relname || ' toast table', t.relkind, t.relpersistence FROM pg_class r
37083655
UNION ALL
37093656
SELECT r.relname || ' toast index', ri.relkind, ri.relpersistence FROM pg_class r join pg_class t ON t.oid = r.reltoastrelid JOIN pg_index i ON i.indrelid = t.oid JOIN pg_class ri ON ri.oid = i.indexrelid WHERE r.relname ~ '^logged1'
37103657
ORDER BY relname;
3711-
relname | relkind | relpersistence
3712-
---------------------+---------+----------------
3713-
logged1 | r | u
3714-
logged1 toast index | i | u
3715-
logged1 toast table | t | u
3716-
logged1_f1_seq | S | u
3717-
logged1_pkey | i | u
3718-
(5 rows)
3658+
relname | relkind | relpersistence
3659+
----------------+---------+----------------
3660+
logged1 | r | u
3661+
logged1_f1_seq | S | u
3662+
logged1_pkey | i | u
3663+
(3 rows)
37193664

37203665
ALTER TABLE logged1 SET UNLOGGED; -- silently do nothing
37213666
DROP TABLE logged3;

contrib/pax_storage/src/test/regress/expected/compression_1.out

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ LINE 1: SELECT pg_column_compression(x) FROM compressmv;
194194
CREATE TABLE cmpart(f1 text COMPRESSION lz4) PARTITION BY HASH(f1);
195195
ERROR: compression method lz4 not supported
196196
DETAIL: This functionality requires the server to be built with lz4 support.
197-
HINT: You need to rebuild PostgreSQL using --with-lz4.
198197
CREATE TABLE cmpart1 PARTITION OF cmpart FOR VALUES WITH (MODULUS 2, REMAINDER 0);
199198
ERROR: relation "cmpart" does not exist
200199
CREATE TABLE cmpart2(f1 text COMPRESSION pglz);
@@ -316,10 +315,10 @@ DETAIL: This functionality requires the server to be built with lz4 support.
316315
HINT: You need to rebuild PostgreSQL using --with-lz4.
317316
CREATE UNIQUE INDEX idx1 ON cmdata2 ((f1 || f2));
318317
ERROR: relation "cmdata2" does not exist
319-
INSERT INTO cmdata2 VALUES((SELECT array_agg(md5(g::TEXT))::TEXT FROM
318+
INSERT INTO cmdata2 VALUES((SELECT array_agg(fipshash(g::TEXT))::TEXT FROM
320319
generate_series(1, 50) g), VERSION());
321320
ERROR: relation "cmdata2" does not exist
322-
LINE 1: INSERT INTO cmdata2 VALUES((SELECT array_agg(md5(g::TEXT))::...
321+
LINE 1: INSERT INTO cmdata2 VALUES((SELECT array_agg(fipshash(g::TEX...
323322
^
324323
-- check data is ok
325324
SELECT length(f1) FROM cmdata;

contrib/pax_storage/src/test/regress/expected/createdb.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ HINT: Inject an infinite 'skip' into the 'fts_probe' fault to disable FTS probi
212212
-- should fail
213213
create database db4 STRATEGY = file_copy;
214214
ERROR: fault triggered, fault name:'end_prepare_two_phase' fault type:'panic' (seg0 127.0.1.1:7002 pid=3774836)
215-
NOTICE: Releasing segworker groups to retry broadcast.
216215
select force_mirrors_to_catch_up();
217216
force_mirrors_to_catch_up
218217
---------------------------

contrib/pax_storage/src/test/regress/expected/default_tablespace.out

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
\set default_tablespace :abs_builddir '/testtablespace_default_tablespace'
33
\set database_tablespace :abs_builddir '/testtablespace_database_tablespace'
44
create tablespace some_default_tablespace location :'default_tablespace';
5+
WARNING: tablespace location "/home/gpadmin/cloudberry/contrib/pax_storage/src/test/regress/testtablespace_default_tablespace" is too long for TAR
6+
DETAIL: The location is used to create a symlink target from pg_tblspc. Symlink targets are truncated to 100 characters when sending a TAR (e.g the BASE_BACKUP protocol response).
57
create tablespace some_database_tablespace location :'database_tablespace';
8+
WARNING: tablespace location "/home/gpadmin/cloudberry/contrib/pax_storage/src/test/regress/testtablespace_database_tablespace" is too long for TAR
9+
DETAIL: The location is used to create a symlink target from pg_tblspc. Symlink targets are truncated to 100 characters when sending a TAR (e.g the BASE_BACKUP protocol response).
610
create database database_for_default_tablespace;
711
\c database_for_default_tablespace;
812
set default_tablespace to some_default_tablespace;

contrib/pax_storage/src/test/regress/expected/gp_gin_index.out

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -623,50 +623,50 @@ EXPLAIN SELECT count(*) FROM test_tsvector WHERE a @@ '!no_such_lexeme';
623623
SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh';
624624
count
625625
-------
626-
158
626+
316
627627
(1 row)
628628

629629
SELECT count(*) FROM test_tsvector WHERE a @@ 'wr&qh';
630630
count
631631
-------
632-
17
632+
34
633633
(1 row)
634634

635635
SELECT count(*) FROM test_tsvector WHERE a @@ 'eq&yt';
636636
count
637637
-------
638-
6
638+
12
639639
(1 row)
640640

641641
SELECT count(*) FROM test_tsvector WHERE a @@ 'eq|yt';
642642
count
643643
-------
644-
98
644+
196
645645
(1 row)
646646

647647
SELECT count(*) FROM test_tsvector WHERE a @@ '(eq&yt)|(wr&qh)';
648648
count
649649
-------
650-
23
650+
46
651651
(1 row)
652652

653653
SELECT count(*) FROM test_tsvector WHERE a @@ '(eq|yt)&(wr|qh)';
654654
count
655655
-------
656-
39
656+
78
657657
(1 row)
658658

659659
SELECT count(*) FROM test_tsvector WHERE a @@ 'w:*|q:*';
660660
count
661661
-------
662-
496
662+
988
663663
(1 row)
664664

665665
-- For orca, ScalarArrayOpExpr condition on index scan not supported
666666
SELECT count(*) FROM test_tsvector WHERE a @@ any ('{wr,qh}');
667667
count
668668
-------
669-
158
669+
316
670670
(1 row)
671671

672672
SELECT count(*) FROM test_tsvector WHERE a @@ 'no_such_lexeme';
@@ -678,7 +678,7 @@ SELECT count(*) FROM test_tsvector WHERE a @@ 'no_such_lexeme';
678678
SELECT count(*) FROM test_tsvector WHERE a @@ '!no_such_lexeme';
679679
count
680680
-------
681-
1022
681+
1018
682682
(1 row)
683683

684684
DROP INDEX wowidx;

contrib/pax_storage/src/test/regress/expected/gp_tablespace.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ FROM gp_tablespace_location((SELECT oid FROM pg_tablespace WHERE spcname='testsp
387387
-- another version of GPDB.
388388
\set testtablespace_existing_version_dir :testtablespace '_existing_version_dir'
389389
CREATE TABLESPACE testspace_existing_version_dir LOCATION :'testtablespace_existing_version_dir';
390+
WARNING: tablespace location "/home/gpadmin/cloudberry/contrib/pax_storage/src/test/regress/testtablespace_existing_version_dir" is too long for TAR
391+
DETAIL: The location is used to create a symlink target from pg_tblspc. Symlink targets are truncated to 100 characters when sending a TAR (e.g the BASE_BACKUP protocol response).
390392
SELECT * FROM
391393
(SELECT pg_ls_dir('pg_tblspc/' || oid) AS versiondirs
392394
FROM pg_tablespace

contrib/pax_storage/src/test/regress/expected/indexing.out

Lines changed: 11 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,64 +1290,19 @@ insert into idxpart values (572814, 'five');
12901290
ERROR: duplicate key value violates unique constraint "idxpart2_a_idx"
12911291
DETAIL: Key (a)=(572814) already exists.
12921292
insert into idxpart values (857142, 'six');
1293-
select tableoid::regclass, * from idxpart order by a;
1294-
tableoid | a | b
1295-
----------+--------+----------------
1296-
idxpart1 | 0 | zero
1297-
idxpart1 | 16 | sixteen
1298-
idxpart1 | 42 | life
1299-
idxpart1 | 65536 | sixteen
1300-
idxpart2 | 142857 | one
1301-
idxpart2 | 285714 | two
1302-
idxpart2 | 572814 | inserted first
1303-
idxpart2 | 857142 | six
1293+
select * from idxpart order by a;
1294+
a | b
1295+
--------+----------------
1296+
0 | zero
1297+
16 | sixteen
1298+
42 | life
1299+
65536 | sixteen
1300+
142857 | one
1301+
285714 | two
1302+
572814 | inserted first
1303+
857142 | six
13041304
(8 rows)
13051305

1306-
drop table idxpart;
1307-
-- Test some other non-btree index types
1308-
create table idxpart (a int, b text, c int[]) partition by range (a);
1309-
create table idxpart1 partition of idxpart for values from (0) to (100000);
1310-
set enable_seqscan to off;
1311-
create index idxpart_brin on idxpart using brin(b);
1312-
explain (costs off) select * from idxpart where b = 'abcd';
1313-
QUERY PLAN
1314-
-------------------------------------------------
1315-
Gather Motion 3:1 (slice1; segments: 3)
1316-
-> Bitmap Heap Scan on idxpart1 idxpart
1317-
Recheck Cond: (b = 'abcd'::text)
1318-
-> Bitmap Index Scan on idxpart1_b_idx
1319-
Index Cond: (b = 'abcd'::text)
1320-
Optimizer: Postgres query optimizer
1321-
(6 rows)
1322-
1323-
drop index idxpart_brin;
1324-
create index idxpart_spgist on idxpart using spgist(b);
1325-
explain (costs off) select * from idxpart where b = 'abcd';
1326-
QUERY PLAN
1327-
-------------------------------------------------
1328-
Gather Motion 3:1 (slice1; segments: 3)
1329-
-> Bitmap Heap Scan on idxpart1 idxpart
1330-
Recheck Cond: (b = 'abcd'::text)
1331-
-> Bitmap Index Scan on idxpart1_b_idx
1332-
Index Cond: (b = 'abcd'::text)
1333-
Optimizer: Postgres query optimizer
1334-
(6 rows)
1335-
1336-
drop index idxpart_spgist;
1337-
create index idxpart_gin on idxpart using gin(c);
1338-
explain (costs off) select * from idxpart where c @> array[42];
1339-
QUERY PLAN
1340-
----------------------------------------------------
1341-
Gather Motion 3:1 (slice1; segments: 3)
1342-
-> Bitmap Heap Scan on idxpart1 idxpart
1343-
Recheck Cond: (c @> '{42}'::integer[])
1344-
-> Bitmap Index Scan on idxpart1_c_idx
1345-
Index Cond: (c @> '{42}'::integer[])
1346-
Optimizer: Postgres query optimizer
1347-
(6 rows)
1348-
1349-
drop index idxpart_gin;
1350-
reset enable_seqscan;
13511306
drop table idxpart;
13521307
-- intentionally leave some objects around
13531308
create table idxpart (a int) partition by range (a);

contrib/pax_storage/src/test/regress/expected/pg_ext_aux.out

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ ERROR: permission denied: "extaux_t" is a system catalog
6262
set gp_enable_refresh_fast_path = off;
6363
-- end_ignore
6464
refresh materialized view pg_ext_aux.extaux_mv;
65-
ERROR: cannot swap toast files by links for system catalogs (cluster.c:XXX)
65+
-- start_ignore
66+
reset gp_enable_refresh_fast_path;
67+
-- end_ignore
6668
-- fail: should not allow to be dropped by user
6769
drop view pg_ext_aux.extaux_v;
6870
ERROR: permission denied: "extaux_v" is a system catalog

contrib/pax_storage/src/test/regress/expected/privileges.out

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,6 @@ CREATE TABLE atest12 as
458458
CREATE INDEX ON atest12 (a);
459459
CREATE INDEX ON atest12 (abs(a));
460460
-- results below depend on having quite accurate stats for atest12, so...
461-
ALTER TABLE atest12 SET (autovacuum_enabled = off);
462-
WARNING: autovacuum is not supported in Cloudberry
463461
SET default_statistics_target = 10000;
464462
VACUUM ANALYZE atest12;
465463
RESET default_statistics_target;

contrib/pax_storage/src/test/regress/expected/returning_gp.out

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,27 +71,24 @@ update returning_parttab set partkey = 18 where partkey = 4 returning *;
7171

7272
-- delete
7373
delete from returning_parttab where partkey = 14 returning *;
74-
distkey | partkey | t
75-
---------+---------+----------
76-
2 | 14 | multi2 4
77-
(1 row)
78-
74+
ERROR: not implemented yet on pax relations: TupleFetchRowVersion
7975
-- Check table contents, to be sure that all the commands did what they claimed.
8076
select * from returning_parttab;
8177
distkey | partkey | t
8278
---------+---------+----------------
8379
1 | 1 | single insert
80+
1 | 9 | multi 3
8481
1 | 1 | multi 1
8582
1 | 2 | multi 2
8683
1 | 5 | multi 5
87-
1 | 9 | multi 3
88-
1 | 18 | multi 4
8984
1 | 10 | single2 insert
85+
1 | 18 | multi 4
9086
2 | 11 | multi2 1
9187
2 | 12 | multi2 2
88+
2 | 14 | multi2 4
9289
2 | 15 | multi2 5
9390
2 | 19 | multi2 3
94-
(11 rows)
91+
(12 rows)
9592

9693
--
9794
-- DELETE RETURNING is currently not supported on AO tables.

0 commit comments

Comments
 (0)