From 8d195e021166d6f4d816bbeeac3555bf61bf7b29 Mon Sep 17 00:00:00 2001 From: Pavel Borisov Date: Tue, 30 Mar 2021 18:03:10 +0400 Subject: [PATCH v1] Stabilize tablespaces test for partitioned indexes. When doing tablespace test sometimes (very rarely) the order of parent and child tables change which made test fail. --- src/test/regress/input/tablespace.source | 2 +- src/test/regress/output/tablespace.source | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/regress/input/tablespace.source b/src/test/regress/input/tablespace.source index 1a181016d71..d689d2b7d79 100644 --- a/src/test/regress/input/tablespace.source +++ b/src/test/regress/input/tablespace.source @@ -88,7 +88,7 @@ CREATE TABLE testschema.part1 PARTITION OF testschema.part FOR VALUES IN (1); CREATE INDEX part_a_idx ON testschema.part (a) TABLESPACE regress_tblspace; CREATE TABLE testschema.part2 PARTITION OF testschema.part FOR VALUES IN (2); SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c - where c.reltablespace = t.oid AND c.relname LIKE 'part%_idx'; + where c.reltablespace = t.oid AND c.relname LIKE 'part%_idx' ORDER BY 1; \d testschema.part \d+ testschema.part \d testschema.part1 diff --git a/src/test/regress/output/tablespace.source b/src/test/regress/output/tablespace.source index 94c5f023c68..2980159d492 100644 --- a/src/test/regress/output/tablespace.source +++ b/src/test/regress/output/tablespace.source @@ -132,7 +132,7 @@ CREATE TABLE testschema.part1 PARTITION OF testschema.part FOR VALUES IN (1); CREATE INDEX part_a_idx ON testschema.part (a) TABLESPACE regress_tblspace; CREATE TABLE testschema.part2 PARTITION OF testschema.part FOR VALUES IN (2); SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c - where c.reltablespace = t.oid AND c.relname LIKE 'part%_idx'; + where c.reltablespace = t.oid AND c.relname LIKE 'part%_idx' ORDER BY 1; relname | spcname -------------+------------------ part1_a_idx | regress_tblspace -- 2.28.0