Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j6LWn-000663-LX for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Feb 2020 21:44:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j6LWl-0007Bb-3M for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Feb 2020 21:44:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j6LWk-0007BU-Qd for pgsql-hackers@lists.postgresql.org; Mon, 24 Feb 2020 21:44:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j6LWi-0005iz-7O for pgsql-hackers@lists.postgresql.org; Mon, 24 Feb 2020 21:44:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 01OLiRg4005196; Mon, 24 Feb 2020 16:44:27 -0500 From: Tom Lane To: Alvaro Herrera cc: Thomas Munro , =?iso-8859-1?Q?R=E9mi?= Zara , Michael Paquier , PostgreSQL Hackers Subject: Re: pgsql: Add kqueue(2) support to the WaitEventSet API. In-reply-to: <20200224211709.GA6996@alvherre.pgsql> References: <20200224211709.GA6996@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 24 Feb 2020 18:17:09 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5194.1582580667.1@sss.pgh.pa.us> Date: Mon, 24 Feb 2020 16:44:27 -0500 Message-ID: <5195.1582580667@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2020-Feb-24, Tom Lane wrote: >> Why not just drive it off max_files_per_process? On Unix, that >> largely exists to override the ulimit setting anyway. With no >> comparable knob on a Windows system, we might as well just say >> that's what you set. > That makes sense to me -- but if we do that, then maybe we should be > doing the setrlimit() dance on it too, on Linux^W^W where supported. Yeah, arguably we could try to setrlimit if max_files_per_process is larger than the ulimit. We should definitely not reduce the ulimit if max_files_per_process is smaller, though, since the DBA might intentionally be leaving daylight for purposes such as FD-hungry PL functions. On the whole I'm inclined to leave well enough alone on the Unix side --- there's nothing there that the DBA can't set if she wishes. regards, tom lane