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 1vE39x-003oGX-EJ for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Oct 2025 10:12:04 +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 1vE39u-00HIxR-FX for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Oct 2025 10:12:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vE39t-00HIxJ-IR for pgsql-hackers@lists.postgresql.org; Wed, 29 Oct 2025 10:12:01 +0000 Received: from fout-a2-smtp.messagingengine.com ([103.168.172.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vE39p-004rHO-0f for pgsql-hackers@postgresql.org; Wed, 29 Oct 2025 10:12:00 +0000 Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id 15C89EC027C; Wed, 29 Oct 2025 06:11:54 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Wed, 29 Oct 2025 06:11:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding: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=fm2; t=1761732714; x=1761819114; bh=BTp2tpHnbfQ/CbiwKZy++L0kRe9H4zWL JPFjDFNlpR8=; b=OwbPWECuZqqP/2WpBKsaoT9MAdvTHxAuxDXmCefqkkeZiDRS FS2VIQ9h36m1bTU4wtWOsV+W0/85iJLwn20bK5RsaENOKXcYkKgs1kMWJab3gqla omgMAYBf8GGz2PKDHmcpVAgXB06xK/OKO3l8rak/+JDT2VijKRTILF5ydyiKRg8p agVFnntY5aK7cC7PaOkx+8yldfJeonkY/E6J7N+WO1fRSyJNXwLZpCjqXhhqCK3V P3J92rE4AU3WODk7DmPmx6+WKVsZF+NwfHeQAsQTxtVhH4qeQIgf61W4bmq9yLde Nuz4sCm/ZyZSeKz9vpZP4LY8BquJBayVtZf9aA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1761732714; x= 1761819114; bh=BTp2tpHnbfQ/CbiwKZy++L0kRe9H4zWLJPFjDFNlpR8=; b=O v3RDrsy7JJ9nhqUVUXnFQMKKcJVyIKDx+dWgTVLkspQaJ2f8lU3fTzHsADvj9hu4 57rwv/mi6Z5oxZjCZX4/GGrUX/meJESHyJ0MT2ERiPpiGDQUCX7nQzxGjcKurdR4 NJg/MxTALI0ia/Audkl4795oFb+O4pSvHClMHwCiSMr55PB+z2PGbSKYd663aCaP cWqG0lOTSusdIi5sGZgS0/65RmdmlFWYAb1XhsmmEjR+DPC495fTonyT3AowBVJQ TZGUYYIkh4FHGO5Gv4xOPX/vOI2S2wxEwYiRE2aUhfZ+wVlkK1s+I2KksWUhW2zK fAljpowV6Rsv2hi45QfkQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduieefgeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgheqne cuggftrfgrthhtvghrnhepgfejtdfhkeeftdeugfeileehteeljeeghfeuledthfeutedv ffdukeefjefhgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthho peeipdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehpohhsthhgrhgvshesjhgvlh htvghfrdhnlhdprhgtphhtthhopehhlhhinhhnrghkrgesihhkihdrfhhipdhrtghpthht oheprghnughrvghssegrnhgrrhgriigvlhdruggvpdhrtghpthhtohepthhglhesshhssh drphhghhdrphgrrdhushdprhgtphhtthhopehtohhmrghssehvohhnughrrgdrmhgvpdhr tghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 29 Oct 2025 06:11:52 -0400 (EDT) Message-ID: Date: Wed, 29 Oct 2025 11:11:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Bump soft open file limit (RLIMIT_NOFILE) to hard limit on startup To: Jelte Fennema-Nio , Heikki Linnakangas , Andres Freund Cc: Tom Lane , Tomas Vondra , PostgreSQL-development References: <3203865.1739301613@sss.pgh.pa.us> <94798ef1-0f13-416a-983a-88447e434a7f@vondra.me> <7u7dbn6s2i6bf3hjzkbqaexj2bpoblqxwbkffbetl4rjv6dcom@s2uickjc5z53> <3216369.1739308717@sss.pgh.pa.us> <4huky7iczrycvq3ptpjkkzrclsabqceu6jyppizotjafqywq5g@g4eynaqxjog5> <9004aa84-4ea3-414f-9268-101510f41a29@iki.fi> Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 13.04.25 21:30, Jelte Fennema-Nio wrote: > On Fri Apr 4, 2025 at 7:34 PM CEST, Heikki Linnakangas wrote: >> Let's move that 'in_restore_command' business to the caller. It's >> weird modularity for the function to implicitly behave differently for >> some callers. > > I definitely agree with the sentiment, and it was what I originally > planned to do. But then I went for this approach anyway because commit > 8fb13dd6ab5b explicitely moved all code except for the actual call to > system() out of the PreRestoreCommand()/PostRestoreCommand() section > (which is also described in the code comment). > So I didn't move the the in_restore_command stuff to the caller, and > improved the function comment to call out this unfortunate coupling. >> And 'wait_event_info' should only affect pgstat reporting, not actual >> behavior. > > Given that we need to keep the restore command stuff in this function, I > think the only other option is to add a dedicated argument for the > restore command stuff, like "bool is_restore_command". But that would > require every caller, except for the restore command, to pass an > additional "false" as an argument. To me the additionaly noise that that > adds seems like a worse issue than the non-purity we get by > piggy-backing on the wait_event_info argument. > >> I don't feel good about the function name. How about pg_system() or >> something? This patch set is showing compiler warnings because pg_system() wasn't properly declared where needed. Please provide an update that builds cleanly. Also, it appears the patch for pgbench disappeared from the series. Was that intentional?