Skip to content

More lenient handling of unsupported options in CREATE INDEX#1333

Merged
zachmu merged 2 commits intomainfrom
zachmu/create-index
Mar 26, 2025
Merged

More lenient handling of unsupported options in CREATE INDEX#1333
zachmu merged 2 commits intomainfrom
zachmu/create-index

Conversation

@zachmu
Copy link
Copy Markdown
Member

@zachmu zachmu commented Mar 26, 2025

No description provided.

@zachmu zachmu requested a review from fulghum March 26, 2025 18:35
@github-actions
Copy link
Copy Markdown
Contributor

Main PR
covering_index_scan_postgres 390.36/s 389.78/s -0.2%
index_join_postgres 156.16/s 157.12/s +0.6%
index_join_scan_postgres 188.77/s 188.63/s -0.1%
index_scan_postgres 12.68/s 12.63/s -0.4%
oltp_point_select 2810.83/s 2782.34/s -1.1%
oltp_read_only 1869.08/s 1881.93/s +0.6%
select_random_points 113.12/s 113.01/s -0.1%
select_random_ranges 137.20/s 138.84/s +1.1%
table_scan_postgres 10.37/s 10.29/s -0.8%
types_table_scan_postgres 5.43/s 5.50/s +1.2%

Copy link
Copy Markdown
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@github-actions
Copy link
Copy Markdown
Contributor

Main PR
Total 42090 42090
Successful 15727 15767
Failures 26363 26323
Partial Successes1 5198 5201
Main PR
Successful 37.3652% 37.4602%
Failures 62.6348% 62.5398%

${\color{red}Regressions (3)}$

join

QUERY:          select * from
(
  select unique1, q1, coalesce(unique1, -1) + q1 as fault
  from int8_tbl left join tenk1 on (q2 = unique2)
) ss
where fault = 122
order by fault;
RECEIVED ERROR: expected row count 1 but received 0
QUERY:          INSERT INTO a VALUES (0, 0), (1, NULL);
RECEIVED ERROR: number of values does not match number of columns provided (errno 1105) (sqlstate HY000)
QUERY:          INSERT INTO c VALUES (0), (1);
RECEIVED ERROR: number of values does not match number of columns provided (errno 1105) (sqlstate HY000)

${\color{lightgreen}Progressions (44)}$

btree_index

QUERY: CREATE INDEX bt_i4_index ON bt_i4_heap USING btree (seqno int4_ops);
QUERY: CREATE INDEX bt_name_index ON bt_name_heap USING btree (seqno name_ops);
QUERY: CREATE INDEX bt_txt_index ON bt_txt_heap USING btree (seqno text_ops);
QUERY: CREATE INDEX bt_f8_index ON bt_f8_heap USING btree (seqno float8_ops);
QUERY: create index btree_tall_idx on btree_tall_tbl (t, id) with (fillfactor = 10);

collate.icu.utf8

QUERY: CREATE INDEX collate_test1_idx2 ON collate_test1 (b COLLATE "C");
QUERY: CREATE INDEX collate_dep_test4i ON collate_dep_test4t (b COLLATE test0);

create_index

QUERY: CREATE INDEX onek_unique1 ON onek USING btree(unique1 int4_ops);
QUERY: CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops);
QUERY: CREATE INDEX onek_hundred ON onek USING btree(hundred int4_ops);
QUERY: CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 name_ops);
QUERY: CREATE INDEX tenk1_unique1 ON tenk1 USING btree(unique1 int4_ops);
QUERY: CREATE INDEX tenk1_unique2 ON tenk1 USING btree(unique2 int4_ops);
QUERY: CREATE INDEX tenk1_hundred ON tenk1 USING btree(hundred int4_ops);
QUERY: CREATE UNIQUE INDEX cwi_uniq4_idx ON cwi_test(b collate "POSIX");

indexing

QUERY: create index on idxpart2 (a collate "POSIX");
QUERY: create index on idxpart2 (a collate "C");
QUERY: create index on idxpart (a collate "C");
QUERY: create index on idxpart (a text_pattern_ops);
QUERY: create index on only idxpart (a text_pattern_ops);

insert_conflict

QUERY: create unique index op_index_key on insertconflicttest(key, fruit text_pattern_ops);
QUERY: create unique index collation_index_key on insertconflicttest(key, fruit collate "C");
QUERY: create unique index both_index_key on insertconflicttest(key, fruit collate "C" text_pattern_ops);

join

QUERY: select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand)
  from tenk1 a left join tenk1 b on b.thousand = a.unique1                        left join tenk1 c on c.unique2 = coalesce(b.twothousand, a.twothousand)
  where a.unique2 < 10 and coalesce(b.twothousand, a.twothousand) = 44;
QUERY: INSERT INTO a VALUES (0), (1);

plpgsql

QUERY: create unique index Room_rno on Room using btree (roomno bpchar_ops);
QUERY: create unique index WSlot_name on WSlot using btree (slotname bpchar_ops);
QUERY: create unique index PField_name on PField using btree (name text_ops);
QUERY: create unique index PSlot_name on PSlot using btree (slotname bpchar_ops);
QUERY: create unique index PLine_name on PLine using btree (slotname bpchar_ops);
QUERY: create unique index Hub_name on Hub using btree (name bpchar_ops);
QUERY: create unique index HSlot_name on HSlot using btree (slotname bpchar_ops);
QUERY: create index HSlot_hubname on HSlot using btree (hubname bpchar_ops);
QUERY: create unique index System_name on System using btree (name text_ops);
QUERY: create unique index IFace_name on IFace using btree (slotname bpchar_ops);
QUERY: create unique index PHone_name on PHone using btree (slotname bpchar_ops);
QUERY: insert into PField values ('PF1_1', 'should fail due to unique index');
QUERY: insert into HSlot values ('HS', 'base.hub1', 20, '');
QUERY: insert into IFace values ('IF', 'notthere', 'eth0', '');
QUERY: insert into IFace values ('IF', 'orion', 'ethernet_interface_name_too_long', '');

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

@zachmu zachmu merged commit a88fead into main Mar 26, 2025
18 checks passed
@zachmu zachmu deleted the zachmu/create-index branch March 26, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants