From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: jungleboogie0@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclared identifier 'FD_SETSIZE'
Date: Mon, 19 Aug 2019 00:32:51 -0400
Message-ID: <23514.1566189171@sss.pgh.pa.us> (raw)
In-Reply-To: <20190819042832.GA1702@paquier.xyz>
References: <20190818001858.ho3ev4z57fqhs7a5@alap3.anarazel.de>
<20190819025953.GA15110@alvherre.pgsql>
<20190819042832.GA1702@paquier.xyz>
Michael Paquier <michael@paquier.xyz> writes:
> On Sun, Aug 18, 2019 at 10:59:54PM -0400, Alvaro Herrera wrote:
>> So I agree that we need a fix.
> How would you detect how many fds can be opened by a user in this
> case?
I think Andres' suggestion is probably fine: don't try to detect
it in advance. Just open the files, and error out if we need to
put an fd index >= FD_SETSIZE into an fd_set. It'll be a shade
less user-friendly, in that the program might run for a bit before
failing; but I doubt that such cases arise often enough to be worth
working harder.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, alvherre@2ndquadrant.com, andres@anarazel.de, dilipbalaut@gmail.com, jungleboogie0@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclared identifier 'FD_SETSIZE'
In-Reply-To: <23514.1566189171@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox