Skip to content

Commit

Permalink
Fix cherry-pick issues.
Browse files Browse the repository at this point in the history
Fix expected output due to gp_appendonly_insert_files feature.
  • Loading branch information
reshke committed Feb 10, 2025
1 parent 29a24b2 commit 1332cf6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
3 changes: 3 additions & 0 deletions src/test/isolation2/input/uao/brin_chain.source
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ INSERT INTO brin_chain_@amname@ SELECT '2' FROM generate_series(1, 1000);
ALTER TABLE brin_chain_@amname@ SET ACCESS METHOD @amname@;

1: BEGIN;
1: SET gp_appendonly_insert_files TO 0;
2: BEGIN;
2: SET gp_appendonly_insert_files TO 0;
3: BEGIN;
3: SET gp_appendonly_insert_files TO 0;

-- Insert 180000000 rows into seg1. Use COPY for speed.
!\retcode yes 2 | head -n 180000000 > /tmp/brin_chain_@amname@_seg1.csv;
Expand Down
33 changes: 19 additions & 14 deletions src/test/isolation2/output/uao/brin_chain.source
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ ALTER

1: BEGIN;
BEGIN
1: SET gp_appendonly_insert_files TO 0;
SET
2: BEGIN;
BEGIN
2: SET gp_appendonly_insert_files TO 0;
SET
3: BEGIN;
BEGIN
3: SET gp_appendonly_insert_files TO 0;
SET

-- Insert 180000000 rows into seg1. Use COPY for speed.
!\retcode yes 2 | head -n 180000000 > /tmp/brin_chain_@amname@_seg1.csv;
Expand Down Expand Up @@ -71,35 +77,34 @@ CREATE
0 | meta
1 | revmap
2 | regular
3 | revmap
3 | regular
4 | regular
5 | regular
6 | regular
6 | revmap
7 | revmap
8 | revmap
(9 rows)
(8 rows)
1U: SELECT firstrevmappages[:5] FROM brin_metapage_info(get_raw_page('brin_chain_@amname@_i_idx', 0));
firstrevmappages
-----------------------------------
[1, 3, 4294967295, 8, 4294967295]
firstrevmappages
--------------------------------------------
[4294967295, 1, 4294967295, 7, 4294967295]
(1 row)
1U: SELECT lastrevmappages[:5] FROM brin_metapage_info(get_raw_page('brin_chain_@amname@_i_idx', 0));
lastrevmappages
-----------------------------------
[1, 7, 4294967295, 8, 4294967295]
lastrevmappages
--------------------------------------------
[4294967295, 6, 4294967295, 7, 4294967295]
(1 row)
1U: SELECT lastrevmappagenums[:5] FROM brin_metapage_info(get_raw_page('brin_chain_@amname@_i_idx', 0));
lastrevmappagenums
--------------------
[1, 2, 0, 1, 0]
[0, 2, 0, 1, 0]
(1 row)
1U: SELECT segnum, brin_revmap_chain(get_raw_page('brin_chain_@amname@_i_idx', 0), 'brin_chain_@amname@_i_idx', segnum) AS chain FROM generate_series(0, 3) segnum;
segnum | chain
--------+--------
0 | [1]
1 | [3, 7]
0 |
1 | [1, 6]
2 |
3 | [8]
3 | [7]
(4 rows)

-- Now test index retrieval. We should be able to:
Expand Down

0 comments on commit 1332cf6

Please sign in to comment.