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 1j6JC5-0001Zt-9r for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Feb 2020 19:15:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j6JC3-0004gf-HN for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Feb 2020 19:15:03 +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 1j6JC3-0004gX-8A for pgsql-hackers@lists.postgresql.org; Mon, 24 Feb 2020 19:15:03 +0000 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j6JC0-0004XD-6T for pgsql-hackers@lists.postgresql.org; Mon, 24 Feb 2020 19:15:02 +0000 Received: by mail-qt1-x836.google.com with SMTP id r5so7317909qtt.9 for ; Mon, 24 Feb 2020 11:14:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=eG9EHAZjJIrwhTkc3J88F4ER6bm/JXWMSR64vDP37zc=; b=t47Vki1igTvvitwxDZCK2TQjrrbQIm3UjvBrqwMEM/hiZ0jJ1w04IzHY812dgS5nvZ wD5HQOTtwH4kx4xZ/wvalUWL1oN3Nnkp8q44HhE1CcyLVtNKXzvFarHj7gyrLzqN6J8l ZSboFvKojkP48f8BcXXqhIUY09o2jViUJIhCEXXSaozZ3VU8paQj9/ECGos0+9GN+HPx FukzB1BMrz75h19AnNt7PzNu36HaSeiKelAmPpSNdaBTWK8s65c2qjiY16m0cBU+WPtW Zzy/5mq46RLTv+VewAhBWuwIFFCLjTfzRIcWGGDuWs6Hh9NdFqISLx4wZbGojjV8Li9i n73w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=eG9EHAZjJIrwhTkc3J88F4ER6bm/JXWMSR64vDP37zc=; b=P6/fAdBe+MW/BHQV8pyFqVOEhDUniezHgkOGysZGAwEQDYax1C4zA/RLaaTz5ZhsGK EWXIHEcyVNu6YteAgECwrvvDcbqfKoPl2ay1sVBbyw1jalF4k/5S+QHDdkoKTy4raU15 vfE/Pa7z3lfOzC4Y6aiurjEYcXRWnox0fQPtB5S9KilrboPx0FYvwpwU+a3ZxFKUZUxW PhvdFR2GHbZyKCTOF421W+V6cZiGM7YcS/vIH3pl0EY6fyUceKZ2PjLIU5b4h0qmulxa XBknvZZ6l0DdqCRwHwq32217lZG8OTuafzZAZoiDfJUn2zP7VLMB4FbChzr/GAhZ6Dhr zowg== X-Gm-Message-State: APjAAAVNTI5vHOYIeEctbOZr0IiB4iUeWFxBjXFn+cNG9Cm0i73Ej+e5 MHsQZGDoW/OYIzT1fv06tEvqGQ== X-Google-Smtp-Source: APXvYqxKY89p339gduCEPEpEE5gy7m54+AMyBAgGNVJeTuHQFnE5K7gdNgK85zLuk7jmn2Gg6mv6yQ== X-Received: by 2002:ac8:5510:: with SMTP id j16mr49340554qtq.262.1582571698280; Mon, 24 Feb 2020 11:14:58 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([70.32.0.53]) by smtp.gmail.com with ESMTPSA id m27sm6576833qta.21.2020.02.24.11.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 11:14:57 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id A93E73007EE; Mon, 24 Feb 2020 16:14:53 -0300 (-03) Date: Mon, 24 Feb 2020 16:14:53 -0300 From: Alvaro Herrera To: Tom Lane 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. Message-ID: <20200224191453.GA711@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <16353.1582555469@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Feb-24, Tom Lane wrote: > We could also consider a HINT, along the lines of "Raise the server's > max_files_per_process and/or \"ulimit -n\" limits." This again has > the ambiguity about which server, and it also seems dangerously > platform-specific. Maybe talk about "the local server" to distinguish from the other one. As for the platform dependencies, I see two main options: make the hint platform-specific (i.e have #ifdef branches per platform) or make it even more generic, such as "file descriptor limits". A quick search suggests that current Windows itself doesn't typically have such problems: https://stackoverflow.com/questions/31108693/increasing-no-of-file-handles-in-windows-7-64-bit https://docs.microsoft.com/es-es/archive/blogs/markrussinovich/pushing-the-limits-of-windows-handles But the C runtime does: https://docs.microsoft.com/en-us/cpp/c-runtime-library/file-handling?view=vs-2019 I suppose we do use the C runtime. There's a reference to _setmaxstdio() being able to raise the limit from the default of 512 to up to 8192 open files. We don't currently invoke that. https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setmaxstdio?view=vs-2019 -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services