File tree 5 files changed +13
-11
lines changed
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';
22
22
23
23
-- drop the tablespace so we can re-use the location
24
24
DROP TABLESPACE regress_tblspacewith;
25
- -- create a tablespace we can use
26
- CREATE TABLESPACE regress_tblspace LOCATION '';
27
25
-- This returns a relative path as of an effect of allow_in_place_tablespaces,
28
26
-- masking the tablespace OID used in the path name.
29
27
SELECT 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);
331
329
CREATE INDEX part_a_idx ON testschema.part (a) TABLESPACE regress_tblspace;
332
330
CREATE TABLE testschema.part2 PARTITION OF testschema.part FOR VALUES IN (2);
333
331
SELECT 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 ;
335
333
relname | spcname
336
334
-------------+------------------
337
335
part1_a_idx | regress_tblspace
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ SET synchronous_commit = on;
18
18
-- and most of the core regression tests still expect that.
19
19
--
20
20
GRANT 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 '';
21
24
--
22
25
-- These tables have traditionally been referenced by many tests,
23
26
-- so create and populate them. Insert only non-error values here.
Original file line number Diff line number Diff line change 11
11
# required setup steps
12
12
test: test_setup
13
13
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
-
19
14
# ----------
20
15
# The first group of parallel tests
21
16
# ----------
@@ -132,3 +127,7 @@ test: event_trigger oidjoins
132
127
133
128
# this test also uses event triggers, so likewise run it by itself
134
129
test: 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';
20
20
-- drop the tablespace so we can re-use the location
21
21
DROP TABLE SPACE regress_tblspacewith;
22
22
23
- -- create a tablespace we can use
24
- CREATE TABLESPACE regress_tblspace LOCATION ' ' ;
25
23
-- This returns a relative path as of an effect of allow_in_place_tablespaces,
26
24
-- masking the tablespace OID used in the path name.
27
25
SELECT 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);
225
223
CREATE INDEX part_a_idx ON testschema .part (a) TABLESPACE regress_tblspace;
226
224
CREATE TABLE testschema .part2 PARTITION OF testschema .part FOR VALUES IN (2 );
227
225
SELECT 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 ;
229
227
\d testschema .part
230
228
\d+ testschema .part
231
229
\d testschema .part1
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ SET synchronous_commit = on;
23
23
--
24
24
GRANT ALL ON SCHEMA public TO public;
25
25
26
+ -- Create a tablespace we can use in tests.
27
+ SET allow_in_place_tablespaces = true;
28
+ CREATE TABLESPACE regress_tblspace LOCATION ' ' ;
29
+
26
30
--
27
31
-- These tables have traditionally been referenced by many tests,
28
32
-- so create and populate them. Insert only non-error values here.
You can’t perform that action at this time.
0 commit comments