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

Commit2f932f7

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 parentaf052da commit2f932f7

File tree

11 files changed

+468
-177
lines changed

11 files changed

+468
-177
lines changed

‎src/Makefile.global.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,13 @@ ifeq ($(enable_tap_tests),yes)
430430
defineprove_installcheck
431431
rm -rf '$(CURDIR)'/tmp_check
432432
$(MKDIR_P) '$(CURDIR)'/tmp_check
433-
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)
433+
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)
434434
endef
435435

436436
defineprove_check
437437
rm -rf '$(CURDIR)'/tmp_check
438438
$(MKDIR_P) '$(CURDIR)'/tmp_check
439-
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)
439+
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)
440440
endef
441441

442442
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp