summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gustafsson2023-12-08 12:42:54 +0000
committerDaniel Gustafsson2023-12-08 12:42:54 +0000
commit00edb2061fcf288574b7b5c0be67fab71f7e136b (patch)
tree3000f26c5202029a794d1bd6389fcaa564e2406c
parent44913add91e789884e207f19c1d7ec067f23f6d5 (diff)
Don't clean initdb files on template creation failure
Commit 252dcb32397f6 introduced initdb template caching to speed up tests by re-using initdb output. The initdb command didn't however use the --no-clean option to preserve generated data in case initdb crashes unlike pg_regress which does do this. This adds the option to initdb to aid debugging. While changing the commandline, switch to using long options for initdb to make the code more self-documenting. Author: Matthias van de Meent <boekewurm+postgres@gmail.com> Discussion: https://postgr.es/m/CAEze2WhSTjfK_M+Ea4GSQp8odrEOaQS8HyORd1TJUEiyXaB+rw@mail.gmail.com
-rw-r--r--meson.build3
-rw-r--r--src/Makefile.global.in2
2 files changed, 3 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 0f2c76ec25e..52c2a37c41d 100644
--- a/meson.build
+++ b/meson.build
@@ -3116,7 +3116,8 @@ sys.exit(sp.returncode)
''',
test_initdb_template,
temp_install_bindir / 'initdb',
- '-A', 'trust', '-N', '--no-instructions', '--no-locale'
+ '--auth', 'trust', '--no-sync', '--no-instructions', '--no-locale',
+ '--no-clean'
],
priority: setup_tests_priority - 1,
timeout: 300,
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index b3ca6392a6b..104e5de0fe2 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -423,7 +423,7 @@ ifeq ($(MAKELEVEL),0)
$(MAKE) -C '$(top_builddir)' DESTDIR='$(abs_top_builddir)'/tmp_install install >'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1
$(MAKE) -j1 $(if $(CHECKPREP_TOP),-C $(CHECKPREP_TOP),) checkprep >>'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1
- $(with_temp_install) initdb -A trust -N --no-instructions --no-locale '$(abs_top_builddir)'/tmp_install/initdb-template >>'$(abs_top_builddir)'/tmp_install/log/initdb-template.log 2>&1
+ $(with_temp_install) initdb --auth trust --no-sync --no-instructions --no-locale --no-clean '$(abs_top_builddir)'/tmp_install/initdb-template >>'$(abs_top_builddir)'/tmp_install/log/initdb-template.log 2>&1
endif
endif
endif