@@ -35,10 +35,7 @@ $$ LANGUAGE plpython3u;
3535\set adst_source_tablespace_location :abs_builddir ' /testtablespace/adst_source'
3636\set adst_destination_tablespace_location :abs_builddir ' /testtablespace/adst_dest'
3737
38- CREATE or REPLACE FUNCTION setup () RETURNS VOID AS $$
39- DECLARE
40- adst_source_tablespace_location text := :' adst_source_tablespace_location' ;
41- adst_destination_tablespace_location text := :' adst_destination_tablespace_location' ;
38+ CREATE or REPLACE FUNCTION setup (adst_source_tablespace_location text , adst_destination_tablespace_location text ) RETURNS VOID AS $$
4239BEGIN
4340 -- Setup tablespace directories
4441 PERFORM setup_tablespace_location_dir_for_test(adst_source_tablespace_location);
@@ -167,7 +164,7 @@ $fn$;
167164-- | M2 | deleted | moved | XLOG_XACT_COMMIT_PREPARED | |
168165-- +---------+-----------+-----------+------------------------------+-------+
169166
170- SELECT setup();
167+ SELECT setup(: ' adst_source_tablespace_location ' , : ' adst_destination_tablespace_location ' );
171168-- Given we create the source and destination tablespaces
172169CREATE TABLESPACE adst_source_tablespace LOCATION :' adst_source_tablespace_location' ;
173170CREATE TABLESPACE adst_destination_tablespace LOCATION :' adst_destination_tablespace_location' ;
@@ -224,7 +221,7 @@ SELECT force_mirrors_to_catch_up();
224221-- | SMaster | remains | deleted | XLOG_XACT_ABORT | |
225222-- +---------+-----------+-----------+-------------------+-------+
226223
227- SELECT setup();
224+ SELECT setup(: ' adst_source_tablespace_location ' , : ' adst_destination_tablespace_location ' );
228225-- Given we create the source and destination tablespaces
229226CREATE TABLESPACE adst_source_tablespace LOCATION :' adst_source_tablespace_location' ;
230227CREATE TABLESPACE adst_destination_tablespace LOCATION :' adst_destination_tablespace_location' ;
@@ -287,7 +284,7 @@ SELECT force_mirrors_to_catch_up();
287284-- | M2 | remains | deleted | XLOG_XACT_ABORT | |
288285-- +---------+-----------+-----------+-------------------+-------+
289286
290- SELECT setup();
287+ SELECT setup(: ' adst_source_tablespace_location ' , : ' adst_destination_tablespace_location ' );
291288-- Given we create the source and destination tablespaces
292289CREATE TABLESPACE adst_source_tablespace LOCATION :' adst_source_tablespace_location' ;
293290CREATE TABLESPACE adst_destination_tablespace LOCATION :' adst_destination_tablespace_location' ;
@@ -357,7 +354,7 @@ SELECT force_mirrors_to_catch_up();
357354-- | M2 | remains | deleted | XLOG_XACT_ABORT | |
358355-- +---------+-----------+-----------+-------------------+-------+
359356
360- SELECT setup();
357+ SELECT setup(: ' adst_source_tablespace_location ' , : ' adst_destination_tablespace_location ' );
361358-- Given we create the source and destination tablespaces
362359CREATE TABLESPACE adst_source_tablespace LOCATION :' adst_source_tablespace_location' ;
363360CREATE TABLESPACE adst_destination_tablespace LOCATION :' adst_destination_tablespace_location' ;
@@ -430,7 +427,7 @@ SELECT force_mirrors_to_catch_up();
430427-- | M2 | remains | deleted | XLOG_XACT_ABORT_PREPARED | |
431428-- +---------+-----------+-----------+--------------------------+-------+
432429
433- SELECT setup();
430+ SELECT setup(: ' adst_source_tablespace_location ' , : ' adst_destination_tablespace_location ' );
434431-- Given we create the source and destination tablespaces
435432CREATE TABLESPACE adst_source_tablespace LOCATION :' adst_source_tablespace_location' ;
436433CREATE TABLESPACE adst_destination_tablespace LOCATION :' adst_destination_tablespace_location' ;
@@ -493,7 +490,7 @@ SELECT force_mirrors_to_catch_up();
493490-- | M2 | remains | deleted | XLOG_XACT_ABORT_PREPARED | |
494491-- +---------+-----------+-----------+--------------------------+-------+
495492
496- SELECT setup();
493+ SELECT setup(: ' adst_source_tablespace_location ' , : ' adst_destination_tablespace_location ' );
497494-- Given we create the source and destination tablespaces
498495CREATE TABLESPACE adst_source_tablespace LOCATION :' adst_source_tablespace_location' ;
499496CREATE TABLESPACE adst_destination_tablespace LOCATION :' adst_destination_tablespace_location' ;
@@ -558,7 +555,7 @@ SELECT force_mirrors_to_catch_up();
558555-- | M2 | remains | deleted | XLOG_XACT_ABORT_PREPARED | |
559556-- +---------+-----------+-----------+--------------------------+-------+
560557
561- SELECT setup();
558+ SELECT setup(: ' adst_source_tablespace_location ' , : ' adst_destination_tablespace_location ' );
562559-- Given we create the source and destination tablespaces
563560CREATE TABLESPACE adst_source_tablespace LOCATION :' adst_source_tablespace_location' ;
564561CREATE TABLESPACE adst_destination_tablespace LOCATION :' adst_destination_tablespace_location' ;
@@ -620,7 +617,7 @@ SELECT force_mirrors_to_catch_up();
620617-- | M2 | remains | deleted | XLOG_XACT_ABORT_PREPARED | |
621618-- +-------------+-----------+-----------+--------------------------+-------+
622619
623- SELECT setup();
620+ SELECT setup(: ' adst_source_tablespace_location ' , : ' adst_destination_tablespace_location ' );
624621-- Given we create the source and destination tablespaces
625622CREATE TABLESPACE adst_source_tablespace LOCATION :' adst_source_tablespace_location' ;
626623CREATE TABLESPACE adst_destination_tablespace LOCATION :' adst_destination_tablespace_location' ;
@@ -688,7 +685,7 @@ SELECT force_mirrors_to_catch_up();
688685-- | M2 | remains | deleted | XLOG_XACT_ABORT_PREPARED | |
689686-- +-------------+-----------+-----------+--------------------------+-------+
690687
691- SELECT setup();
688+ SELECT setup(: ' adst_source_tablespace_location ' , : ' adst_destination_tablespace_location ' );
692689-- Given we create the source and destination tablespaces
693690CREATE TABLESPACE adst_source_tablespace LOCATION :' adst_source_tablespace_location' ;
694691CREATE TABLESPACE adst_destination_tablespace LOCATION :' adst_destination_tablespace_location' ;
@@ -773,7 +770,7 @@ show fsync;
773770SELECT gp_wait_until_triggered_fault(' ckpt_loop_begin' , 1 , mirror0());
774771
775772
776- SELECT setup();
773+ SELECT setup(: ' adst_source_tablespace_location ' , : ' adst_destination_tablespace_location ' );
777774-- Create the source and destination tablespaces
778775CREATE TABLESPACE adst_source_tablespace LOCATION :' adst_source_tablespace_location' ;
779776CREATE TABLESPACE adst_destination_tablespace LOCATION :' adst_destination_tablespace_location' ;
@@ -815,8 +812,9 @@ DROP SCHEMA adst CASCADE;
815812
816813SELECT gp_inject_fault(' all' , ' reset' , dbid) FROM gp_segment_configuration;
817814
818- \!rm - rf @testtablespace@/ adst_source
819- \!rm - rf @testtablespace@/ adst_dest
815+
816+ \!rm - rf $PG_ABS_BUILDDIR/ testtablespace/ adst_source
817+ \!rm - rf $PG_ABS_BUILDDIR/ testtablespace/ adst_dest
820818
821819-- - start_ignore
822820-- Set fsync on because it is the value before the test
0 commit comments