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 1mDoUz-0006Ib-18 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Aug 2021 13:42:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mDoUx-0001g7-VL for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Aug 2021 13:42:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDoUx-0001cO-Na for pgsql-hackers@lists.postgresql.org; Wed, 11 Aug 2021 13:42:23 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mDoUv-0005mB-71 for pgsql-hackers@lists.postgresql.org; Wed, 11 Aug 2021 13:42:22 +0000 Received: by mail-ej1-x62c.google.com with SMTP id h9so4415920ejs.4 for ; Wed, 11 Aug 2021 06:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gnxBJOKIUyrw1Je/a2t8YtsKv8TVG2SubwjVFaV/mGM=; b=cMqn2ZinLFUf35a9D6ZSF5vzgxPjplTYVxOXRaRTgv09r+olMCs5QHBU+NhgdE+Ap2 XnQss6MrTjh0GMrY0hej3cmld276W2GvS/s432v4okZzBtnSeTO8HGvUJpTXS73Q3XrF G10XG54MRRFBIfaYFtOFN1/xiLBLlrRO4poMfDK3Rpp+MfiVOcrborR0V4V7VYRFMV/R u0YSwoZKsVe+I47vMvbVXx7vo9gm3IpF8vWWzcqo4datTioLPd6VGrCrnh0fQjJ0S3ZC SiZqRQuxPBU3OiUtwqvguE3XvBfSmIBvQimi7fLBlCk5pavC456PaWB+tUbuFTQ9zZ4Z hnCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gnxBJOKIUyrw1Je/a2t8YtsKv8TVG2SubwjVFaV/mGM=; b=Gb8tOuWjFHi5YlbwruX2RtkOxsvunhw8VTBSRqANDtAsHSq7F2JQltzhZ8hpuVJEaJ cBNAU5EDm7J5Vr8Qsnl20r8Y4SCSKGmm2A7TMwzbUuAkPuOuuU2t1xa7nFywrwbwAq4i K9YfnjGNNQvt1n0tjDy5rs93dn7FAZGzbyTMQsarURwWag3FhNwK9dpkh5nGQ6mIROVP fpvD1/oZeZWLWUnDsjl1/gakJ8apaI7Ol2nyy3Jv6YbGsLYDGjdgtkNgEkDMf8tUIdQ1 lPHpXnzA9cuhu8JhxtlfeyiqOqXb7QqXmRXncYH3Kh7qRIj8aojHcNFNHS8PbCllRw6M pHCA== X-Gm-Message-State: AOAM5334tz1hnmECFVjm0k1S8biFJeOxnHELHawRQ4p5rNruiZL+xZmI QcFzGhuUsnih9SP6ZDRKXgRulCWpSmS4l2mNqT4= X-Google-Smtp-Source: ABdhPJxCMGANQMXI4vLxj5b56T2uBpIV5OEAGeSh3YS67V2G9BJMfHGrndJ06I2sxoJD48OKpm/Ug+0JHTZB980mD0A= X-Received: by 2002:a17:906:779a:: with SMTP id s26mr3770182ejm.106.1628689340031; Wed, 11 Aug 2021 06:42:20 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <77F481D5-2F4C-405E-9335-E68550375D4B@amazon.com> From: Greg Sabino Mullane Date: Wed, 11 Aug 2021 09:41:43 -0400 Message-ID: Subject: Re: make MaxBackends available in _PG_init To: "Bossart, Nathan" Cc: Robert Haas , Andres Freund , Bharath Rupireddy , "pgsql-hackers@lists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000008fe87a05c948c902" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008fe87a05c948c902 Content-Type: text/plain; charset="UTF-8" On Mon, Aug 9, 2021 at 8:22 PM Bossart, Nathan 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 --0000000000008fe87a05c948c902 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Aug 9, 2021 at 8:22 PM Bossart, N= athan <bossartn@amazon.com>= ; wrote:
> Is this going to get tripped by a call from restor= e_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 fam= iliar 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 add= ed exit(1) to restore_backend_variables() and the tests still ran fine. Fur= ther digging shows that even though the #ifdef EXEC_BACKEND path is trigger= ed, 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) w= hen testing?

Cheers,
Greg

=

--0000000000008fe87a05c948c902--