Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7c414cd

Browse files
committed
Consistently test for in-use shared memory.
postmaster startup scrutinizes any shared memory segment recorded inpostmaster.pid, exiting if that segment matches the current datadirectory and has an attached process. When the postmaster.pid file wasmissing, a starting postmaster used weaker checks. Change to use thesame checks in both scenarios. This increases the chance of a startupfailure, in lieu of data corruption, if the DBA does "kill -9 `head -n1postmaster.pid` && rm postmaster.pid && pg_ctl -w start". A postmasterwill no longer recycle segments pertaining to other data directories.That's good for production, but it's bad for integration tests thatcrash a postmaster and immediately delete its data directory. Such atest now leaks a segment indefinitely. No "make check-world" test doesthat. win32_shmem.c already avoided all these problems. In 9.6 andlater, enhance PostgresNode to facilitate testing. Back-patch to 9.4(all supported versions).Reviewed by Daniel Gustafsson and Kyotaro HORIGUCHI.Discussion:https://postgr.es/m/20130911033341.GD225735@tornado.leadboat.com
1 parentdb4bc99 commit7c414cd

File tree

11 files changed

+467
-176
lines changed

11 files changed

+467
-176
lines changed

‎src/Makefile.global.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,12 +383,12 @@ ifeq ($(enable_tap_tests),yes)
383383

384384
defineprove_installcheck
385385
rm -rf$(CURDIR)/tmp_check/log
386-
cd$(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' top_builddir='$(CURDIR)/$(top_builddir)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress'$(PROVE)$(PG_PROVE_FLAGS)$(PROVE_FLAGS)$(if$(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
386+
cd$(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' top_builddir='$(CURDIR)/$(top_builddir)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress'REGRESS_SHLIB='$(abs_top_builddir)/src/test/regress/regress$(DLSUFFIX)'$(PROVE)$(PG_PROVE_FLAGS)$(PROVE_FLAGS)$(if$(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
387387
endef
388388

389389
defineprove_check
390390
rm -rf$(CURDIR)/tmp_check/log
391-
cd$(srcdir) && TESTDIR='$(CURDIR)'$(with_temp_install) PGPORT='6$(DEF_PGPORT)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress'$(PROVE)$(PG_PROVE_FLAGS)$(PROVE_FLAGS)$(if$(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
391+
cd$(srcdir) && TESTDIR='$(CURDIR)'$(with_temp_install) PGPORT='6$(DEF_PGPORT)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress'REGRESS_SHLIB='$(abs_top_builddir)/src/test/regress/regress$(DLSUFFIX)'$(PROVE)$(PG_PROVE_FLAGS)$(PROVE_FLAGS)$(if$(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
392392
endef
393393

394394
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp