Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tkuZn-007mnX-2s for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Feb 2025 00:38:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tkuZl-00G3dV-Fv for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Feb 2025 00:38:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tkuZk-00G3dC-Gd for pgsql-hackers@lists.postgresql.org; Thu, 20 Feb 2025 00:38:01 +0000 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tkuZh-001oEm-2f for pgsql-hackers@postgresql.org; Thu, 20 Feb 2025 00:37:59 +0000 Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.phl.internal (Postfix) with ESMTP id B90B61140174; Wed, 19 Feb 2025 19:37:56 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Wed, 19 Feb 2025 19:37:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1740011876; x=1740098276; bh=isQHH+3Mv1 HbXCqX2PU/yE1oNDZHm2cIiRBSC6YEslI=; b=IvOJAoBvP9GIeXaQJIoN332LgE gfk0W5BUboGXkJ80f5V2fcQHJyUyq1jfm0Xm8S9GEfVMSwZkyr5Tic3zCivRPCke A+J4xzk5E/YvfHWImbF/uBAezRcMomChb+JZ7kDFhIPPIOt86awCE3w9NgdiKVCm Lvs/j5XSLji9jAl4288WsmK77J8AIqiOfXvim7P4QpKKIqgpvwb3w5hSkpZyGojc bzvX2Exs2fFJgQ9jk3LPwGqqZ7IFSbbMn1m1KxB7oc1uNxA7ayMcQoj/8+ilLO0m XCgMKL5YsPzoX9Q5rgSivmZwtruns9jDUQFtsUymfpNNgel+tMk/yBucI1Rw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1740011876; x=1740098276; bh=isQHH+3Mv1HbXCqX2PU/yE1oNDZHm2cIiRB SC6YEslI=; b=VKwAOROttNvlpoJzj+6PtvITgfwX5pVOg/nU9h4SD9HXSkinHai Cchdsamh28mqACZjs/mcvGRHkc9+Vr3gRoDDQPafYZ/1uv1QIWYrhpzOXKH8hXSh b+MJ3liRERflAQxSiPYYpRMAtEizPzTSirwynVZmP74u+1OiAf2YJnixBCj8WWqJ CljyX4lUcjKuNaVoCo6VCijDDGWov0Pk4/NCDsL0DoZqr75HuaQckCKgZPeI8JWI lEBmV9ybmDz6RETGn0SMO29A6EN2hIIdn7R2NLMA7yVLWf61/0L0AEenBWujSdQn JXrQ95KlGe/pvn+CjkE4YXI4LLdaOMu78yA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeiheejvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfhfgggtuggjsehttdfstddttddv necuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgrii gvlhdruggvqeenucggtffrrghtthgvrhhnpeeffffgledvffegtdevlefgtdeggffhvdek gfegteeiveejkeetudelveejhfeugeenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvgdpnhgspghr tghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhoshhtghhrvg hssehjvghlthgvfhdrnhhlpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphho shhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepthhglhesshhsshdrphhghhdrphgrrd hushdprhgtphhtthhopehtohhmrghssehvohhnughrrgdrmhgv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Feb 2025 19:37:56 -0500 (EST) Date: Wed, 19 Feb 2025 19:37:55 -0500 From: Andres Freund To: Jelte Fennema-Nio Cc: Tom Lane , Tomas Vondra , PostgreSQL-development Subject: Re: Bump soft open file limit (RLIMIT_NOFILE) to hard limit on startup Message-ID: <4huky7iczrycvq3ptpjkkzrclsabqceu6jyppizotjafqywq5g@g4eynaqxjog5> References: <3203865.1739301613@sss.pgh.pa.us> <94798ef1-0f13-416a-983a-88447e434a7f@vondra.me> <7u7dbn6s2i6bf3hjzkbqaexj2bpoblqxwbkffbetl4rjv6dcom@s2uickjc5z53> <3216369.1739308717@sss.pgh.pa.us> 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 Hi, On 2025-02-17 21:25:33 +0100, Jelte Fennema-Nio wrote: > On Mon, 17 Feb 2025 at 18:24, Andres Freund wrote: > > Why not do this only in the if (rlim.rlim_cur < nclients + 3) case? > > Done, I also changed it to not bump to rlim_max, but only to nclients > + 3. The rest of the patches I'll update later. But response below. I've pushed this, with one trivial modification: I added %m to the error message in case setrlimit() fails. That's really unlikely to ever happen, but ... Greetings, Andres Freund