postgresql/src
Noah Misch 891e9e0aee Consistently test for in-use shared memory.
postmaster startup scrutinizes any shared memory segment recorded in
postmaster.pid, exiting if that segment matches the current data
directory and has an attached process.  When the postmaster.pid file was
missing, a starting postmaster used weaker checks.  Change to use the
same checks in both scenarios.  This increases the chance of a startup
failure, in lieu of data corruption, if the DBA does "kill -9 `head -n1
postmaster.pid` && rm postmaster.pid && pg_ctl -w start".  A postmaster
will no longer recycle segments pertaining to other data directories.
That's good for production, but it's bad for integration tests that
crash a postmaster and immediately delete its data directory.  Such a
test now leaks a segment indefinitely.  No "make check-world" test does
that.  win32_shmem.c already avoided all these problems.  In 9.6 and
later, 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
2019-04-03 17:03:50 -07:00
..
backend Consistently test for in-use shared memory. 2019-04-03 17:03:50 -07:00
bin Have pg_upgrade's Makefile honor NO_TEMP_INSTALL 2019-03-31 08:22:04 -04:00
common Fix portability failure introduced in commits d2b0b60e7 et al. 2018-12-26 15:30:30 -05:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Consistently test for in-use shared memory. 2019-04-03 17:03:50 -07:00
interfaces Fix potential memory access violation in ecpg if filename of include file is 2019-03-11 16:26:59 +01:00
makefiles Move port-specific parts of with_temp_install to port makefile. 2019-02-04 18:59:44 +00:00
pl Translation updates 2019-02-11 14:21:55 +01:00
port Fix error handling of readdir() port implementation on first file lookup 2019-03-04 09:50:14 +09:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Consistently test for in-use shared memory. 2019-04-03 17:03:50 -07:00
timezone Update time zone data files to tzdata release 2018i. 2019-02-05 10:59:23 -05:00
tools Consistently test for in-use shared memory. 2019-04-03 17:03:50 -07:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore
bcc32.mak
DEVELOPERS
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Consistently test for in-use shared memory. 2019-04-03 17:03:50 -07:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak