Re: make MaxBackends available in _PG_init - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject Re: make MaxBackends available in _PG_init
Date
Msg-id CAKAnmmJsHnNc65aLQErabTdcF=B+bMfSnLNUezC7nnsMb8bCDg@mail.gmail.com
Whole thread Raw
In response to Re: make MaxBackends available in _PG_init  ("Bossart, Nathan" <bossartn@amazon.com>)
Responses Re: make MaxBackends available in _PG_init  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Aug 9, 2021 at 8:22 PM Bossart, Nathan <bossartn@amazon.com> wrote:
> Is this going to get tripped by a call from restore_backend_variables?

I ran 'make check-world' with EXEC_BACKEND with no problems, so I
don't think so.

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. Further digging shows that even though the #ifdef EXEC_BACKEND path is triggered, no --fork argument was being passed. Is there something else one needs to provide to force that --fork (see line 189 of src/backend/main/main.c) when testing?

Cheers,
Greg


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgres perl module namespace
Next
From: Robert Haas
Date:
Subject: Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?