postgresql/src/backend/port
Thomas Munro d49e228a66 Make EXEC_BACKEND more convenient on macOS.
It's hard to disable ASLR on current macOS releases, for testing with
-DEXEC_BACKEND.  You could already set the environment variable
PG_SHMEM_ADDR to something not likely to collide with mappings created
earlier in process startup.  Let's also provide a default value that
works on current releases and architectures, for developer convenience.

As noted in the pre-existing comment, this is a horrible hack, but
-DEXEC_BACKEND is only used by Unix-based PostgreSQL developers for
testing some otherwise Windows-only code paths, so it seems excusable.

Back-patch to all supported branches.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/20210806032944.m4tz7j2w47mant26%40alap3.anarazel.de
2021-08-13 11:10:28 +12:00
..
aix Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
dynloader Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
hpux Redefine Datum as uintptr_t, instead of unsigned long. 2009-12-31 19:41:37 +00:00
tas Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
win32 Fix race condition in our Windows signal emulation. 2019-12-09 15:03:52 -05:00
.gitignore Combine win32 and unix latch implementations. 2016-03-21 11:03:26 +01:00
atomics.c Fix and improve pg_atomic_flag fallback implementation. 2018-04-06 20:01:44 -07:00
Makefile Remove obsolete replacement system() on darwin 2016-08-18 12:00:00 -04:00
posix_sema.c Pad semaphores to avoid false sharing. 2018-07-25 11:00:53 +12:00
sysv_sema.c Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
sysv_shmem.c Make EXEC_BACKEND more convenient on macOS. 2021-08-13 11:10:28 +12:00
win32_sema.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
win32_shmem.c Consistently test for in-use shared memory. 2019-04-12 22:36:42 -07:00