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 1nFcxl-0008Ba-Ic for pgsql-general@arkaria.postgresql.org; Thu, 03 Feb 2022 14:19:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nFcxk-0003ju-6D for pgsql-general@arkaria.postgresql.org; Thu, 03 Feb 2022 14:19:52 +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 1nFcxj-0003jl-Q9 for pgsql-general@lists.postgresql.org; Thu, 03 Feb 2022 14:19:51 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nFcxf-0002NF-NI for pgsql-general@lists.postgresql.org; Thu, 03 Feb 2022 14:19:51 +0000 Received: by mail-pg1-x52e.google.com with SMTP id j10so2385254pgc.6 for ; Thu, 03 Feb 2022 06:19:47 -0800 (PST) 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:in-reply-to; bh=Hj1mrIOeeMbqlwFuJWG8L3XpSJmde6KKsueIz6zrkVg=; b=NImwgpH7h3u8IgF56SSPjGxub9VxorySHIeZJ890Dkc964JmWbsBPtnB4hGdy0hqOZ H3ShrEGpVb2WqUFycq5mDrFDcNHGecSRg9jsl+Xs8efwdsc3dcO26wI3I90/hDyiH3SC Mvx87lU22wHy0lMEx5YioUxBun9QDprwOYGIR3s4EA+xsP8sP+3D7I+WzOkA5rf85rOV I9dlu9MbNeBzlf5ntcTes66B5FFmx7eOFVnwWzCz7DjwEIxPf0rqVQWIrZn/e9VW+Y1x F5sYrRJPoPlGpZE8kUsDlmQF0a8D8T/CoC6a9eiWZNIq/OthVIFnLpuab6zoFfhkP4fM xgnQ== 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:in-reply-to; bh=Hj1mrIOeeMbqlwFuJWG8L3XpSJmde6KKsueIz6zrkVg=; b=qIJJ3pqmEaJMP2JvHHho3zyAC+gb0Jjanlq1YEM3n5Mz6BYPXzqne9N2zwgwkdV/FK iOncLSkj+6MyHf/tdf2SXGePXbPDiOk3Gw971bk0PTRol57c9xrGrafpncJOm0lTLNw8 0o41x8CKA6d8ZihCZchz350ni8t0CxbU7fHweOcU/N5gRslBpLM66Hv80xSPsgpn+N1A 1LzWh7rWmO1F2AoXyz+QOpb0EhrmuMvLQ8WUvZr5gKHZkb39pmA2ixEj0lpz33aYC7OM qadlHiUnnk6RiuTPvwDx8Mrd/B0gi5xKJ9ojzXjRLFgJ4cCAcNxaNyWZ+zQrek4yv7RK V2Yg== X-Gm-Message-State: AOAM532RnsRVfWKJn0WaBwllzCjN4+nfJUcURPR+qytb1Oacr8/2i3lK Zalw1/z8R/JkHQo21LawRb0= X-Google-Smtp-Source: ABdhPJweLr3plzsCZnP9mRfgUv3kbNfSPIok4aCYlG4Gusewu0zY7bePfaguj657aGCUWm5t2f/wLA== X-Received: by 2002:a63:d943:: with SMTP id e3mr28261357pgj.427.1643897985268; Thu, 03 Feb 2022 06:19:45 -0800 (PST) Received: from jrouhaud (2001-b011-1005-388e-c88b-4194-63dd-aee5.dynamic-ip6.hinet.net. [2001:b011:1005:388e:c88b:4194:63dd:aee5]) by smtp.gmail.com with ESMTPSA id h11sm18107642pfe.214.2022.02.03.06.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 06:19:44 -0800 (PST) Date: Thu, 3 Feb 2022 22:19:37 +0800 From: Julien Rouhaud To: Bharath Rupireddy Cc: Luca Ferrari , pgsql-general Subject: Re: max_connections different between primary and standby: is it possible? Message-ID: <20220203141937.adnbceyimpj44d6l@jrouhaud> References: <20220203094727.w3ca3sukfu5xu7hk@jrouhaud> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Feb 03, 2022 at 05:39:57PM +0530, Bharath Rupireddy wrote: > > Agree that the standby should atleast have the capacity that the > primary has in terms of resources. But what I don't like about that > code is calling RecoveryRequiresIntParameter for each parameter > separately and crashing the server FATALly for each insufficient > parameter. Imagine if all the parameters were set to insufficient > values on the standby and users keep setting the reported parameter to > the right value and restart the server. At max, 5 FATAL failure-set > right value-restart have to be performed. Instead, it would be better > if the server emits a single log with all the insufficient > parameters(max_connections, max_worker_processes, max_wal_senders, > max_prepared_transactions and max_locks_per_transaction) values and > crashes FATALly. The users can look at the logs at once, set all the Sure, but one failed start / inspect logs / modify configuration / start will always by longer than just reading the docs and making sure that the configuration is appropriate. It also won't help if you want to modify the settings on your primary and make sure that you won't have an incident on your HA setup.