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.89) (envelope-from ) id 1i0R01-0006uK-8F for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Aug 2019 13:50: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 1i0Qzz-0001D8-P0 for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Aug 2019 13:50: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 1i0Qzz-0001D1-Cn for pgsql-bugs@lists.postgresql.org; Wed, 21 Aug 2019 13:50:03 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0Qzv-0002jx-UL for pgsql-bugs@lists.postgresql.org; Wed, 21 Aug 2019 13:50:02 +0000 Received: by mail-qk1-x743.google.com with SMTP id 125so1843789qkl.6 for ; Wed, 21 Aug 2019 06:49:59 -0700 (PDT) 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=1tOte/QYgtGqGhjO6L/leWffyCQBcBDYAjX2qjfD5Mk=; b=BY6hSLMxN3Tk4OrckMCQyO1mxzvM1Oyqh49dIXsHmBYd4oeqHdPvqDqVKJekFXjyFt IMlTPm5CRCk4IhnUIZyqGQr2irj6IAR9LDJ1ve4Z44wqz44QQuRWUGBr5IMCWfIsLvpL MI+OibFnaLKUbRYStTbisnTqzt6lWyahr5Ih3OXl1ou5pEO564HlQl7n/qm7wiT0iMTk kPQ2LuzRB7JHnjpI3rxT5oWbkQnWVG6V9eooPuTscl+lO2NF7ofRXMix8gFxlbLzNVqR kXmRdUvyjpBYhTkreSapLEb1s9kvWelpAeoESBi0BbcM117MW5NQewQlAmiLUoRl1/f+ 8/Tw== 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=1tOte/QYgtGqGhjO6L/leWffyCQBcBDYAjX2qjfD5Mk=; b=V2n5czYZs8bLwDvGNhlpUfunxGe4c7QeYBA1XZGrXdmKms7aa6tUHjJrtLUqAE4i2c SZ6TdjCGv/chUTcODr/rz1d4mxs7jyw005fjbuNjCdspnjCSyEuFhk8zBoL+5vJKV1kA 81pCEhsTZGLwGeo2DXApk8Hjjiu8r7XjmCVxexep9epsOM5ubPZmleM8uvOteUqmi0MC nIfCPSSwgxALuB6pX/u34N5V1hI4hIIzEN0gGNYw6BHymLXFlBOqgrz9LaufYLofpA2I Wr/f4DUi2qMrk2MjoxbI3uO/mWSSkhhvHItO0dMK0rAybWRSkryOfsBG/hbo1JlgD1B7 Hk4Q== X-Gm-Message-State: APjAAAWfHDNCW1HnFQBVuAi9Ktlc3gYWz2eF9V5Vt6Lcah1WZKaG5dte bfUi/BVK7tnZYnTdl6CmSZecow== X-Google-Smtp-Source: APXvYqxhuo18rMM2v1VR0cDzQnqKoFqKDpRCv5yV+KSCPJMJ7TGC5SFZVVFFzvq5z/4RHGCYtBQ0hw== X-Received: by 2002:a37:a06:: with SMTP id 6mr31044747qkk.185.1566395398213; Wed, 21 Aug 2019 06:49:58 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.217.183.202]) by smtp.gmail.com with ESMTPSA id p38sm13127489qtc.76.2019.08.21.06.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2019 06:49:57 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 5FB2B120E96; Wed, 21 Aug 2019 09:49:54 -0400 (-04) Date: Wed, 21 Aug 2019 09:49:54 -0400 From: Alvaro Herrera To: Michael Paquier Cc: Andres Freund , Tom Lane , Dilip Kumar , jungleboogie0@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclared identifier 'FD_SETSIZE' Message-ID: <20190821134954.GA26174@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190821073619.GC26424@paquier.xyz> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Aug-21, Michael Paquier wrote: > On Tue, Aug 20, 2019 at 10:40:05PM -0400, Alvaro Herrera wrote: > > > > BTW why fprintf? Since you can get into this by careless use of -j, > > ISTM that this should be a translatable string. I'd consider > > pg_log_fatal(). Maybe something like "Argument of -j too large for this > > platform -- try %d", numslots - i. > > If giving a recommendation, shouldn't that be linked only to "i" > instead? If for example numslots = 1024, but that we get an error > after allocating 128 slots because of a lack of fds in the range, then > we would recommend 896, which would still result in an error. I was too tired last night to think this through properly ... the first few times I wrote that were even more wrong. "i" seems right. > I quite like the suggestion from Andres to keep the message simple > with "too many jobs for this platform's select()". You are indeed > right about the pg_log_fatal() part here, I have changed the patch to > do that on my local branch. Well, it's a user-facing error, so I'd rather make it user-friendly. It doesn't seem difficult, or unreliable enough not to try. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services