Re: make MaxBackends available in _PG_init

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
Cc: "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: make MaxBackends available in _PG_init
Date: 2021-08-11 14:08:01
Message-ID: 3969791.1628690881@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Sabino Mullane <htamfids(at)gmail(dot)com> writes:
> v3 looks good, but I'm still not sure how to test the bit mentioned above.
> I'm not familiar with this part of the code (SubPostmasterMain etc.), but
> running make check-world with EXEC_BACKEND does not seem to execute that
> code, as I added exit(1) to restore_backend_variables() and the tests still
> ran fine.

You must not have enabled EXEC_BACKEND properly. It's a compile-time
#define that affects multiple modules, so it's easy to get wrong.
The way I usually turn it on is

make distclean
./configure ... options of choice ...
edit src/include/pg_config.h, add "#define EXEC_BACKEND" line
make, install, test

In this way the setting is persistent till the next distclean/configure
cycle.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2021-08-11 14:15:38 Re: Added schema level support for publication.
Previous Message Tom Lane 2021-08-11 13:55:49 Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?