]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Make EXEC_BACKEND more convenient on macOS.
authorThomas Munro <tmunro@postgresql.org>
Thu, 12 Aug 2021 22:38:22 +0000 (10:38 +1200)
committerThomas Munro <tmunro@postgresql.org>
Thu, 12 Aug 2021 23:11:06 +0000 (11:11 +1200)
commita8096e30f4d08f2b90cc147b44b414191de6155f
tree08cbf835d4a70b7aefc6443b645d72ed2ba90682
parentcd7d9b6b63f1ed1d60cab3888eb0fc2523de6f0e
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
src/backend/port/sysv_shmem.c