File tree Expand file tree Collapse file tree 5 files changed +13
-11
lines changed
Expand file tree Collapse file tree 5 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ SELECT spcoptions FROM pg_tablespace WHERE spcname = 'regress_tblspacewith';
2222
2323-- drop the tablespace so we can re-use the location
2424DROP TABLESPACE regress_tblspacewith;
25- -- create a tablespace we can use
26- CREATE TABLESPACE regress_tblspace LOCATION '';
2725-- This returns a relative path as of an effect of allow_in_place_tablespaces,
2826-- masking the tablespace OID used in the path name.
2927SELECT regexp_replace(pg_tablespace_location(oid), '(pg_tblspc)/(\d+)', '\1/NNN')
@@ -331,7 +329,7 @@ CREATE TABLE testschema.part1 PARTITION OF testschema.part FOR VALUES IN (1);
331329CREATE INDEX part_a_idx ON testschema.part (a) TABLESPACE regress_tblspace;
332330CREATE TABLE testschema.part2 PARTITION OF testschema.part FOR VALUES IN (2);
333331SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c
334- where c.reltablespace = t.oid AND c.relname LIKE 'part%_idx';
332+ where c.reltablespace = t.oid AND c.relname LIKE 'part%_idx' ORDER BY relname ;
335333 relname | spcname
336334-------------+------------------
337335 part1_a_idx | regress_tblspace
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ SET synchronous_commit = on;
1818-- and most of the core regression tests still expect that.
1919--
2020GRANT ALL ON SCHEMA public TO public;
21+ -- Create a tablespace we can use in tests.
22+ SET allow_in_place_tablespaces = true;
23+ CREATE TABLESPACE regress_tblspace LOCATION '';
2124--
2225-- These tables have traditionally been referenced by many tests,
2326-- so create and populate them. Insert only non-error values here.
Original file line number Diff line number Diff line change 1111# required setup steps
1212test: test_setup
1313
14- # run tablespace by itself, and early, because it forces a checkpoint;
15- # we'd prefer not to have checkpoints later in the tests because that
16- # interferes with crash-recovery testing.
17- test: tablespace
18-
1914# ----------
2015# The first group of parallel tests
2116# ----------
@@ -132,3 +127,7 @@ test: event_trigger oidjoins
132127
133128# this test also uses event triggers, so likewise run it by itself
134129test: fast_default
130+
131+ # run tablespace test at the end because it drops the tablespace created during
132+ # setup that other tests may use.
133+ test: tablespace
Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ SELECT spcoptions FROM pg_tablespace WHERE spcname = 'regress_tblspacewith';
2020-- drop the tablespace so we can re-use the location
2121DROP TABLE SPACE regress_tblspacewith;
2222
23- -- create a tablespace we can use
24- CREATE TABLESPACE regress_tblspace LOCATION ' ' ;
2523-- This returns a relative path as of an effect of allow_in_place_tablespaces,
2624-- masking the tablespace OID used in the path name.
2725SELECT regexp_replace(pg_tablespace_location(oid ), ' (pg_tblspc)/(\d +)' , ' \1 /NNN' )
@@ -225,7 +223,7 @@ CREATE TABLE testschema.part1 PARTITION OF testschema.part FOR VALUES IN (1);
225223CREATE INDEX part_a_idx ON testschema .part (a) TABLESPACE regress_tblspace;
226224CREATE TABLE testschema .part2 PARTITION OF testschema .part FOR VALUES IN (2 );
227225SELECT relname, spcname FROM pg_catalog .pg_tablespace t, pg_catalog .pg_class c
228- where c .reltablespace = t .oid AND c .relname LIKE ' part%_idx' ;
226+ where c .reltablespace = t .oid AND c .relname LIKE ' part%_idx' ORDER BY relname ;
229227\d testschema .part
230228\d+ testschema .part
231229\d testschema .part1
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ SET synchronous_commit = on;
2323--
2424GRANT ALL ON SCHEMA public TO public;
2525
26+ -- Create a tablespace we can use in tests.
27+ SET allow_in_place_tablespaces = true;
28+ CREATE TABLESPACE regress_tblspace LOCATION ' ' ;
29+
2630--
2731-- These tables have traditionally been referenced by many tests,
2832-- so create and populate them. Insert only non-error values here.
You can’t perform that action at this time.
0 commit comments