I wrote:
> I believe the core problem is that contrib/test_decoding's regresscheck
> and isolationcheck targets each want to use ./tmp_check as their
> --temp-instance.  make has no reason to believe it shouldn't run those
> two sub-jobs in parallel, but when it does, we get two postmasters trying
> to share the same directory.  This looks reasonably straightforward to
> solve, but I'm not entirely familiar with the code here, and am not
> sure what is the least ugly way to fix it.

Enlarging on that: if I cd into contrib/test_decoding and do
"make check -j4" or so, it reliably fails.  With the attached patch,
it passes.  This is a localized patch that only fixes things for
contrib/test_decoding; what I'm wondering is if it would be better to
establish a more widespread convention that $(pg_isolation_regress_check)
should use a different --temp-instance directory than $(pg_regress_check)
does.

                        regards, tom lane

diff --git a/contrib/test_decoding/.gitignore b/contrib/test_decoding/.gitignore
index 1f95503..09d60bf 100644
*** a/contrib/test_decoding/.gitignore
--- b/contrib/test_decoding/.gitignore
***************
*** 3,5 ****
--- 3,6 ----
  /isolation_output/
  /regression_output/
  /tmp_check/
+ /tmp_check_iso/
diff --git a/contrib/test_decoding/Makefile b/contrib/test_decoding/Makefile
index d2bc8b8..ea31d88 100644
*** a/contrib/test_decoding/Makefile
--- b/contrib/test_decoding/Makefile
*************** PGFILEDESC = "test_decoding - example of
*** 5,11 ****
  
  # Note: because we don't tell the Makefile there are any regression tests,
  # we have to clean those result files explicitly
! EXTRA_CLEAN = $(pg_regress_clean_files) ./regression_output ./isolation_output
  
  ifdef USE_PGXS
  PG_CONFIG = pg_config
--- 5,12 ----
  
  # Note: because we don't tell the Makefile there are any regression tests,
  # we have to clean those result files explicitly
! EXTRA_CLEAN = $(pg_regress_clean_files) ./regression_output \
! 	./isolation_output ./tmp_check_iso
  
  ifdef USE_PGXS
  PG_CONFIG = pg_config
*************** isolationcheck: | submake-isolation subm
*** 59,64 ****
--- 60,66 ----
  	$(MKDIR_P) isolation_output
  	$(pg_isolation_regress_check) \
  	    --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \
+ 	    --temp-instance=./tmp_check_iso \
  	    --outputdir=./isolation_output \
  	    $(ISOLATIONCHECKS)
  
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to