pgsql: Make EXEC_BACKEND more convenient on macOS.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Make EXEC_BACKEND more convenient on macOS.
Date: 2021-08-13 00:03:47
Message-ID: E1mEKfr-0005zG-Hg@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/20210806032944.m4tz7j2w47mant26%40alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/88cbbbfa3e2b0d38d6047af83764f140face5991

Modified Files
--------------
src/backend/port/sysv_shmem.c | 10 ++++++++++
1 file changed, 10 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2021-08-13 00:04:06 pgsql: Make EXEC_BACKEND more convenient on macOS.
Previous Message Tomas Vondra 2021-08-12 20:10:17 pgsql: Use appropriate tuple descriptor in FDW batching