Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDott-0006yz-Rc for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Aug 2021 14:08:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mDots-00054S-N1 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Aug 2021 14:08:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDots-00054J-FY for pgsql-hackers@lists.postgresql.org; Wed, 11 Aug 2021 14:08:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDotq-0006xt-DE for pgsql-hackers@lists.postgresql.org; Wed, 11 Aug 2021 14:08:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 17BE81Mf3969792; Wed, 11 Aug 2021 10:08:01 -0400 From: Tom Lane To: Greg Sabino Mullane cc: "Bossart, Nathan" , Robert Haas , Andres Freund , Bharath Rupireddy , "pgsql-hackers@lists.postgresql.org" Subject: Re: make MaxBackends available in _PG_init In-reply-to: References: <4f20d57b2aeb447b8eb1495319940c5f@G08CNEXMBPEKD06.g08.fujitsu.local> <8499D41B-628A-4CE0-9139-00D718F9D06B@amazon.com> <20210802203724.ujmzgwukenm2en3j@alap3.anarazel.de> <9B2E85FE-14BC-407A-93B7-4EE2F84BEF05@amazon.com> <77F481D5-2F4C-405E-9335-E68550375D4B@amazon.com> Comments: In-reply-to Greg Sabino Mullane message dated "Wed, 11 Aug 2021 09:41:43 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3969790.1628690881.1@sss.pgh.pa.us> Date: Wed, 11 Aug 2021 10:08:01 -0400 Message-ID: <3969791.1628690881@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Greg Sabino Mullane 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