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 1neMWH-0004tv-A5 for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Apr 2022 19:49:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1neMWG-0002vk-85 for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Apr 2022 19:49:44 +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 1neMWF-0002uz-TW for pgsql-hackers@lists.postgresql.org; Tue, 12 Apr 2022 19:49:43 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1neMWD-0008SF-HC for pgsql-hackers@lists.postgresql.org; Tue, 12 Apr 2022 19:49:42 +0000 Received: by mail-pl1-x632.google.com with SMTP id q3so6470934plg.3 for ; Tue, 12 Apr 2022 12:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=5a6bvhOc1kHJEpVqAR5Y33Hc2Pg33KNQ1hgZl0wpnRs=; b=jtCTsGiR+q/2G5HxkAyudRlt0aRhCils6EG3ljPGniCzVL0TKDxxoMGGhEhfum1ZKY CO07tQIGH5kBftIpVkPH+a8Ep9sz+ZPoUIiFnJN40ZBiDA8w7d8rd2zfOtRsd+rK6AgJ 8VyZHGUe85TBfzfdEYJuYkvAnbj8Rqi++zeF2PxtdSJ/5gbiiCfucoQdyYBTObTsEkHX x/J0vZQdxWuACwh8pAuTLNZMZ95NGxGOGFNmfPbKlqylUwL2PQp0veWO3R1f+e6hmY2m kvhPRlFweiEr7MjlYdD+hbSTMTV2tKJvx76JgWlnpTiA2/EwT9EK7k90QkjylIcj+VMY 4AYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=5a6bvhOc1kHJEpVqAR5Y33Hc2Pg33KNQ1hgZl0wpnRs=; b=2g4Aof0gdV5N0sbvuRC1RWKcdq6TCgzpmG2Ks5aHeQB3M44XAYP3uNiPzwVEujeX94 wVgnBRp55aTLi+73VXxbjIsmBnZpzLYR2NWj0GaSAt71ZWlPjET7TRPs4xlicPID5BFd 0ZJzVYL9VGy2svtuKhBYiRgIKMfWyifO+iTvrmNQ1UghhTEtJGmYIzKkW44GhNKKk8DV 9v5A7jqZnuRhCmz5Io7St7dDISLjIXBZ7c0NhKSIHdX8uYPNmmB5rydq/TrzamZk0M4X 7qTRYXAAtP6L04hxn0E57H8jdNSKWntELZwP2j2XTq2w2yX1zgFe/RbnQBLP9S5Ogkl0 iqMw== X-Gm-Message-State: AOAM530EM6a14WFJnhVECIJjVnSPCzmFu/ohY5uhfrcFd8Uv7FuxCzku RtStqwHiJt+TWlCtx7jAPnY= X-Google-Smtp-Source: ABdhPJxPj/BxsfZhxr9aHaDqz6ExwzL+a7+9NE8AqcDHLI+5v8vEo2d/0AvBgAg2G7brMZcH8fV5Rw== X-Received: by 2002:a17:90b:4acc:b0:1cd:37de:3baf with SMTP id mh12-20020a17090b4acc00b001cd37de3bafmr3425735pjb.194.1649792980378; Tue, 12 Apr 2022 12:49:40 -0700 (PDT) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id h189-20020a636cc6000000b0039841f669bcsm3624356pgc.78.2022.04.12.12.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 12:49:39 -0700 (PDT) Date: Tue, 12 Apr 2022 12:49:38 -0700 From: Nathan Bossart To: Robert Haas Cc: Andres Freund , Julien Rouhaud , Michael Paquier , "Bossart, Nathan" , Fujii Masao , "wangsh.fnst@fujitsu.com" , Bharath Rupireddy , Greg Sabino Mullane , Tom Lane , "pgsql-hackers@lists.postgresql.org" Subject: Re: make MaxBackends available in _PG_init Message-ID: <20220412194938.GA2064338@nathanxps13> References: <20220330163051.GA784643@nathanxps13> <20220411164408.GA1915258@nathanxps13> <20220411204442.GA2004824@nathanxps13> <20220411211435.GA2057981@nathanxps13> <20220412174427.sngj2uexzsttazs2@alap3.anarazel.de> <20220412180306.GA2063516@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Apr 12, 2022 at 03:12:42PM -0400, Robert Haas wrote: > But if there's even one use case where adjusting GUCs at this phase is > reasonable, then 0003 isn't really good enough. We need an 0004 that > provides a new hook in a place where such changes can safely be made. I think that is doable. IMO it should be ѕomething like _PG_change_GUCs() that is called before _PG_init(). The other option is to add a hook called after _PG_init() where MaxBackends is available (in which case we likely want GetMaxBackends() again). Thoughts? > Meanwhile, committed 0001. Thanks. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com