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 1i0LAT-0008V0-0w for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Aug 2019 07:36:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i0LAR-0006mZ-E1 for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Aug 2019 07:36:27 +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 1i0LAR-0006mS-6S for pgsql-bugs@lists.postgresql.org; Wed, 21 Aug 2019 07:36:27 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0LAP-0007lc-P5 for pgsql-bugs@lists.postgresql.org; Wed, 21 Aug 2019 07:36:26 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9C8A520F60; Wed, 21 Aug 2019 03:36:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 21 Aug 2019 03:36:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=o6vTZtglp/pN52l4BW43s0Kw84y uq8hc5ezrzdaPkBc=; b=fbP4FEK1akYx+EYcWXsxuRSMMmVrOCYZwvKQNsmmCQq 91sn/Es3muikx/3wngg4PIRAXyEYEELyWpjAu8YunQNOhBI4f1MDuRlMqXIxsbon eZZY9EYW1zlTOSXqqDBrcJEG2u0sMY1+L1eCCtIPhep2z0pGIzsqmPV5ryNI7rat nuEiMIoNtrcNdWmIaicZCD+jLeSpyOvLZKKvIDCvy7LiGZw/wpriFcXovuvhLXjZ RgleiahgPDu5CeXApQ1ccDKp74fMHtUSqBICyCjMJegvMhmCj1yK+WcWmlI/q/Wp wuWMOiI9Mn56NPDk21CaTEm7BAdC5J4O3aWS8Zg/AyQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=o6vTZt glp/pN52l4BW43s0Kw84yuq8hc5ezrzdaPkBc=; b=KKfeLoDo5kFozLG4Wzs7pn z/gdGnRBmjmD2hbPVeOFHNW9zmP85xBBKKX3UIJbyX9o6B4ythDUW2kJPzeaZRWM Ikvo/1q6kqzEtqNUDnoyi+mnXTMM5vSkvFNrsOH+0+HxO9ZsR626g+qTbD4vmjVH Uqpb4g1FWXBxIMzAzPVwnShvY4bxGASHMEP9p7774hGgEYgZBHwMTGOcT0Ud4xLX V5ZpbVhqd1tU3p+ly6Xm72qWook82k35Z3yBLE3HvZEDWEtrA8WhJFC4ychlfW91 CONMWa9JfFl2MnsFwsbXP1IK1l7jl56LU0dWuDhTYWqadrPEY0YrjeyAfsYNh0WQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudegvddguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecukfhppeduuddurddutddvrddukedtrddukeehnecurfgr rhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiinecuve hluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 373FCD6005E; Wed, 21 Aug 2019 03:36:22 -0400 (EDT) Date: Wed, 21 Aug 2019 16:36:19 +0900 From: Michael Paquier To: Alvaro Herrera 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: <20190821073619.GC26424@paquier.xyz> References: <20190821015854.GD1684@paquier.xyz> <20190821024005.GA16883@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline In-Reply-To: <20190821024005.GA16883@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 20, 2019 at 10:40:05PM -0400, Alvaro Herrera wrote: > On 2019-Aug-21, Michael Paquier wrote: >=20 > > + if (PQsocket(conn) >=3D FD_SETSIZE) > > + { > > + fprintf(stderr, "too many jobs for this platform's select()\n"); > > + exit(1); > > + } >=20 > 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 =3D 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 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. -- Michael --KN5l+BnMqAQyZLvT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl1c9HMACgkQnvQgOdby QH34ig/9EuoNEy3pLP/gQg1pMKvKQA7UWyWgM3DcaNXowP6Dpn85Kk0pMggvXvhW o3f2Ayb8hD8HJ1M049mQArkb176vrzFR2OJHmnfE09cv9Hw5TqPNp5+YnJ2weZxS UR9YI3rH0g8I2mOZaS6etJ5DCxg4m+8hC/gkGopZjAVGHAPKQWKaxLgAZ7l2RZs9 cWUqipu2nkJuoyZuv7aM6cW/Uzg0reYSksblJwdj2AYkJlOaQCaJPJ8a/Bb+KoGL 9BXvxFD46hosatAq01F6NEzS3N6wc31vdFoiE1JlOnCvzOV8J0xZQXEcCyJ/983U Lp8kqvCIy+PW0VTfuLsdCLpLu4Dh1MnBnoZIEDbphAmSQIdaPIrwcri3t0QeWJMo 0olFciv9Biy21IbDNqI/ijHDR7Nky91ZgyflOjGJhzCNRprpcFD1okOorSKdSkZX j2Q7COytizMHvM8I0lymsWRCkC0hM1rx4qCnWPFXUzTfTBXr5Cc8faeOjbS6Fv8S iRiS3ywdBOkDHEx2t9TUOSIKHNqvlUH2xzaYuP7qCNxDluxH21nQ4G5/uIk0Op8S z+94FpzVhbitbHZrBcoYX1kIXP4SJu7GLCcCC/CFJxcQ8pBEylAHjdZuPW8urQzK Jfsdtqljr/FN8JUf2rihTLOpzTp3iCPKWki1xmi2h0UzU5bgJJk= =fG0t -----END PGP SIGNATURE----- --KN5l+BnMqAQyZLvT--