mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Fix regression tests for better stability
Per buildfarm
This commit is contained in:
parent
8b08f7d482
commit
189d0ff588
@ -224,26 +224,26 @@ Partition of: idxpart2 FOR VALUES FROM (100) TO (200)
|
|||||||
select indexrelid::regclass, indrelid::regclass, inhparent::regclass
|
select indexrelid::regclass, indrelid::regclass, inhparent::regclass
|
||||||
from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
|
from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
|
||||||
where indexrelid::regclass::text like 'idxpart%'
|
where indexrelid::regclass::text like 'idxpart%'
|
||||||
order by indrelid::regclass::text collate "C";
|
order by indexrelid::regclass::text collate "C";
|
||||||
indexrelid | indrelid | inhparent
|
indexrelid | indrelid | inhparent
|
||||||
-----------------+-----------+---------------
|
-----------------+-----------+---------------
|
||||||
idxpart_a_idx | idxpart |
|
|
||||||
idxpart1_a_idx | idxpart1 | idxpart_a_idx
|
idxpart1_a_idx | idxpart1 | idxpart_a_idx
|
||||||
idxpart2_a_idx | idxpart2 | idxpart_a_idx
|
|
||||||
idxpart22_a_idx | idxpart22 |
|
idxpart22_a_idx | idxpart22 |
|
||||||
|
idxpart2_a_idx | idxpart2 | idxpart_a_idx
|
||||||
|
idxpart_a_idx | idxpart |
|
||||||
(4 rows)
|
(4 rows)
|
||||||
|
|
||||||
alter index idxpart2_a_idx attach partition idxpart22_a_idx;
|
alter index idxpart2_a_idx attach partition idxpart22_a_idx;
|
||||||
select indexrelid::regclass, indrelid::regclass, inhparent::regclass
|
select indexrelid::regclass, indrelid::regclass, inhparent::regclass
|
||||||
from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
|
from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
|
||||||
where indexrelid::regclass::text like 'idxpart%'
|
where indexrelid::regclass::text like 'idxpart%'
|
||||||
order by indrelid::regclass::text collate "C";
|
order by indexrelid::regclass::text collate "C";
|
||||||
indexrelid | indrelid | inhparent
|
indexrelid | indrelid | inhparent
|
||||||
-----------------+-----------+----------------
|
-----------------+-----------+----------------
|
||||||
idxpart_a_idx | idxpart |
|
|
||||||
idxpart1_a_idx | idxpart1 | idxpart_a_idx
|
idxpart1_a_idx | idxpart1 | idxpart_a_idx
|
||||||
idxpart2_a_idx | idxpart2 | idxpart_a_idx
|
|
||||||
idxpart22_a_idx | idxpart22 | idxpart2_a_idx
|
idxpart22_a_idx | idxpart22 | idxpart2_a_idx
|
||||||
|
idxpart2_a_idx | idxpart2 | idxpart_a_idx
|
||||||
|
idxpart_a_idx | idxpart |
|
||||||
(4 rows)
|
(4 rows)
|
||||||
|
|
||||||
-- attaching idxpart22 is not enough to set idxpart22_a_idx valid ...
|
-- attaching idxpart22 is not enough to set idxpart22_a_idx valid ...
|
||||||
@ -600,15 +600,15 @@ alter table idxpart attach partition idxpart2 for values from (10) to (20);
|
|||||||
select c.relname, pg_get_indexdef(indexrelid)
|
select c.relname, pg_get_indexdef(indexrelid)
|
||||||
from pg_class c join pg_index i on c.oid = i.indexrelid
|
from pg_class c join pg_index i on c.oid = i.indexrelid
|
||||||
where indrelid::regclass::text like 'idxpart%'
|
where indrelid::regclass::text like 'idxpart%'
|
||||||
order by indrelid::regclass::text collate "C";
|
order by indexrelid::regclass::text collate "C";
|
||||||
relname | pg_get_indexdef
|
relname | pg_get_indexdef
|
||||||
------------------+--------------------------------------------------------------
|
------------------+--------------------------------------------------------------
|
||||||
idxparti | CREATE INDEX idxparti ON ONLY idxpart USING btree (a)
|
|
||||||
idxparti2 | CREATE INDEX idxparti2 ON ONLY idxpart USING btree (c, b)
|
|
||||||
idxpart1_a_idx | CREATE INDEX idxpart1_a_idx ON idxpart1 USING btree (a)
|
idxpart1_a_idx | CREATE INDEX idxpart1_a_idx ON idxpart1 USING btree (a)
|
||||||
idxpart1_c_b_idx | CREATE INDEX idxpart1_c_b_idx ON idxpart1 USING btree (c, b)
|
idxpart1_c_b_idx | CREATE INDEX idxpart1_c_b_idx ON idxpart1 USING btree (c, b)
|
||||||
idxpart2_a_idx | CREATE INDEX idxpart2_a_idx ON idxpart2 USING btree (a)
|
idxpart2_a_idx | CREATE INDEX idxpart2_a_idx ON idxpart2 USING btree (a)
|
||||||
idxpart2_c_b_idx | CREATE INDEX idxpart2_c_b_idx ON idxpart2 USING btree (c, b)
|
idxpart2_c_b_idx | CREATE INDEX idxpart2_c_b_idx ON idxpart2 USING btree (c, b)
|
||||||
|
idxparti | CREATE INDEX idxparti ON ONLY idxpart USING btree (a)
|
||||||
|
idxparti2 | CREATE INDEX idxparti2 ON ONLY idxpart USING btree (c, b)
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
drop table idxpart;
|
drop table idxpart;
|
||||||
@ -626,12 +626,12 @@ alter table idxpart attach partition idxpart1 for values from (1) to (2);
|
|||||||
select c.relname, pg_get_indexdef(indexrelid)
|
select c.relname, pg_get_indexdef(indexrelid)
|
||||||
from pg_class c join pg_index i on c.oid = i.indexrelid
|
from pg_class c join pg_index i on c.oid = i.indexrelid
|
||||||
where indrelid::regclass::text like 'idxpart%'
|
where indrelid::regclass::text like 'idxpart%'
|
||||||
order by indrelid::regclass::text collate "C";
|
order by indexrelid::regclass::text collate "C";
|
||||||
relname | pg_get_indexdef
|
relname | pg_get_indexdef
|
||||||
------------------+-------------------------------------------------------------------
|
------------------+-------------------------------------------------------------------
|
||||||
idxpart_abs_idx | CREATE INDEX idxpart_abs_idx ON ONLY idxpart USING btree (abs(b))
|
|
||||||
idxpart1_abs_idx | CREATE INDEX idxpart1_abs_idx ON idxpart1 USING btree (abs(b))
|
idxpart1_abs_idx | CREATE INDEX idxpart1_abs_idx ON idxpart1 USING btree (abs(b))
|
||||||
idxpart2_abs_idx | CREATE INDEX idxpart2_abs_idx ON idxpart2 USING btree (abs(b))
|
idxpart2_abs_idx | CREATE INDEX idxpart2_abs_idx ON idxpart2 USING btree (abs(b))
|
||||||
|
idxpart_abs_idx | CREATE INDEX idxpart_abs_idx ON ONLY idxpart USING btree (abs(b))
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
drop table idxpart;
|
drop table idxpart;
|
||||||
@ -649,12 +649,12 @@ create index on idxpart (a) where b > 1000;
|
|||||||
select c.relname, pg_get_indexdef(indexrelid)
|
select c.relname, pg_get_indexdef(indexrelid)
|
||||||
from pg_class c join pg_index i on c.oid = i.indexrelid
|
from pg_class c join pg_index i on c.oid = i.indexrelid
|
||||||
where indrelid::regclass::text like 'idxpart%'
|
where indrelid::regclass::text like 'idxpart%'
|
||||||
order by indrelid::regclass::text collate "C";
|
order by indexrelid::regclass::text collate "C";
|
||||||
relname | pg_get_indexdef
|
relname | pg_get_indexdef
|
||||||
----------------+-----------------------------------------------------------------------------
|
----------------+-----------------------------------------------------------------------------
|
||||||
idxpart_a_idx | CREATE INDEX idxpart_a_idx ON ONLY idxpart USING btree (a) WHERE (b > 1000)
|
|
||||||
idxpart1_a_idx | CREATE INDEX idxpart1_a_idx ON idxpart1 USING btree (a) WHERE (b > 1000)
|
idxpart1_a_idx | CREATE INDEX idxpart1_a_idx ON idxpart1 USING btree (a) WHERE (b > 1000)
|
||||||
idxpart2_a_idx | CREATE INDEX idxpart2_a_idx ON idxpart2 USING btree (a) WHERE (b > 1000)
|
idxpart2_a_idx | CREATE INDEX idxpart2_a_idx ON idxpart2 USING btree (a) WHERE (b > 1000)
|
||||||
|
idxpart_a_idx | CREATE INDEX idxpart_a_idx ON ONLY idxpart USING btree (a) WHERE (b > 1000)
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
drop table idxpart;
|
drop table idxpart;
|
||||||
|
@ -116,12 +116,12 @@ create index on idxpart (a);
|
|||||||
select indexrelid::regclass, indrelid::regclass, inhparent::regclass
|
select indexrelid::regclass, indrelid::regclass, inhparent::regclass
|
||||||
from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
|
from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
|
||||||
where indexrelid::regclass::text like 'idxpart%'
|
where indexrelid::regclass::text like 'idxpart%'
|
||||||
order by indrelid::regclass::text collate "C";
|
order by indexrelid::regclass::text collate "C";
|
||||||
alter index idxpart2_a_idx attach partition idxpart22_a_idx;
|
alter index idxpart2_a_idx attach partition idxpart22_a_idx;
|
||||||
select indexrelid::regclass, indrelid::regclass, inhparent::regclass
|
select indexrelid::regclass, indrelid::regclass, inhparent::regclass
|
||||||
from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
|
from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
|
||||||
where indexrelid::regclass::text like 'idxpart%'
|
where indexrelid::regclass::text like 'idxpart%'
|
||||||
order by indrelid::regclass::text collate "C";
|
order by indexrelid::regclass::text collate "C";
|
||||||
-- attaching idxpart22 is not enough to set idxpart22_a_idx valid ...
|
-- attaching idxpart22 is not enough to set idxpart22_a_idx valid ...
|
||||||
alter index idxpart2_a_idx attach partition idxpart22_a_idx;
|
alter index idxpart2_a_idx attach partition idxpart22_a_idx;
|
||||||
\d idxpart2
|
\d idxpart2
|
||||||
@ -306,7 +306,7 @@ alter table idxpart attach partition idxpart2 for values from (10) to (20);
|
|||||||
select c.relname, pg_get_indexdef(indexrelid)
|
select c.relname, pg_get_indexdef(indexrelid)
|
||||||
from pg_class c join pg_index i on c.oid = i.indexrelid
|
from pg_class c join pg_index i on c.oid = i.indexrelid
|
||||||
where indrelid::regclass::text like 'idxpart%'
|
where indrelid::regclass::text like 'idxpart%'
|
||||||
order by indrelid::regclass::text collate "C";
|
order by indexrelid::regclass::text collate "C";
|
||||||
drop table idxpart;
|
drop table idxpart;
|
||||||
|
|
||||||
-- Verify that columns are mapped correctly in expression indexes
|
-- Verify that columns are mapped correctly in expression indexes
|
||||||
@ -323,7 +323,7 @@ alter table idxpart attach partition idxpart1 for values from (1) to (2);
|
|||||||
select c.relname, pg_get_indexdef(indexrelid)
|
select c.relname, pg_get_indexdef(indexrelid)
|
||||||
from pg_class c join pg_index i on c.oid = i.indexrelid
|
from pg_class c join pg_index i on c.oid = i.indexrelid
|
||||||
where indrelid::regclass::text like 'idxpart%'
|
where indrelid::regclass::text like 'idxpart%'
|
||||||
order by indrelid::regclass::text collate "C";
|
order by indexrelid::regclass::text collate "C";
|
||||||
drop table idxpart;
|
drop table idxpart;
|
||||||
|
|
||||||
-- Verify that columns are mapped correctly for WHERE in a partial index
|
-- Verify that columns are mapped correctly for WHERE in a partial index
|
||||||
@ -340,7 +340,7 @@ create index on idxpart (a) where b > 1000;
|
|||||||
select c.relname, pg_get_indexdef(indexrelid)
|
select c.relname, pg_get_indexdef(indexrelid)
|
||||||
from pg_class c join pg_index i on c.oid = i.indexrelid
|
from pg_class c join pg_index i on c.oid = i.indexrelid
|
||||||
where indrelid::regclass::text like 'idxpart%'
|
where indrelid::regclass::text like 'idxpart%'
|
||||||
order by indrelid::regclass::text collate "C";
|
order by indexrelid::regclass::text collate "C";
|
||||||
drop table idxpart;
|
drop table idxpart;
|
||||||
|
|
||||||
-- Column number mapping: dropped columns in the partition
|
-- Column number mapping: dropped columns in the partition
|
||||||
|
Loading…
x
Reference in New Issue
Block a user