postgres/src
Tom Lane 0d7591c67d Provide a way to control SysV shmem attach address in EXEC_BACKEND builds.
In standard non-Windows builds, there's no particular reason to care what
address the kernel chooses to map the shared memory segment at.  However,
when building with EXEC_BACKEND, there's a risk that the chosen address
won't be available in all child processes.  Linux with ASLR enabled (which
it is by default) seems particularly at risk because it puts shmem segments
into the same area where it maps shared libraries.  We can work around
that by specifying a mapping address that's outside the range where
shared libraries could get mapped.  On x86_64 Linux, 0x7e0000000000
seems to work well.

This is only meant for testing/debugging purposes, so it doesn't seem
necessary to go as far as providing a GUC (or any user-visible
documentation, though we might change that later).  Instead, it's just
controlled by setting an environment variable PG_SHMEM_ADDR to the
desired attach address.

Back-patch to all supported branches, since the point here is to
remove intermittent buildfarm failures on EXEC_BACKEND animals.
Owners of affected animals will need to add a suitable setting of
PG_SHMEM_ADDR to their build_env configuration.

Discussion: https://postgr.es/m/7036.1492231361@sss.pgh.pa.us
2017-04-15 17:28:21 -04:00
..
backend Provide a way to control SysV shmem attach address in EXEC_BACKEND builds. 2017-04-15 17:28:21 -04:00
bin Sanitize newlines in object names in "pg_restore -l" output. 2017-03-10 14:15:09 -05:00
include Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:29 -04:00
interfaces Spelling fixes 2017-03-14 13:45:42 -04:00
makefiles Don't use deprecated dllwrap on Cygwin. 2014-02-01 16:13:46 -05:00
pl Adjust PL/Tcl regression test to dodge a possible bug or zone dependency. 2017-02-19 16:14:53 -05:00
port Stamp 9.2.20. 2017-02-06 16:52:27 -05:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:02:18 -04:00
test Spelling fixes 2017-03-14 13:45:42 -04:00
timezone Update time zone data files to tzdata release 2016j. 2017-01-30 11:41:09 -05:00
tools Remove vestigial references to "zic" in favor of "IANA database". 2016-09-04 19:42:47 -04:00
tutorial Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
.gitignore
bcc32.mak
DEVELOPERS
Makefile
Makefile.global.in Document usage of COPT environment variable for adjusting configure flags. 2017-02-17 16:11:03 -05:00
Makefile.shlib Fix typos in comments. 2017-02-06 11:34:32 +02:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak