Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclaredidentifier 'FD_SETSIZE' - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclaredidentifier 'FD_SETSIZE'
Date
Msg-id 20190821015854.GD1684@paquier.xyz
Whole thread Raw
In response to Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclaredidentifier 'FD_SETSIZE'  (Andres Freund <andres@anarazel.de>)
Responses Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclaredidentifier 'FD_SETSIZE'  (Andres Freund <andres@anarazel.de>)
Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclaredidentifier 'FD_SETSIZE'  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
On Tue, Aug 20, 2019 at 09:05:53AM -0700, Andres Freund wrote:
> On 2019-08-19 14:12:51 +0900, Michael Paquier wrote:
>> - 0002 makes vacuumdb and reindexdb fail when trying to assign a
>> socket with an unsupported range.  Should this bit be backpatched?  We
>> are doing that for vacuumdb for some time now, and the error is
>> confusing so I would prefer fixing it on older branches as well.
>
> Yea, I think we clearly need to. The code right now essentially is a
> wild write, albeit with a somewhat limited range of what it can impact.

Okay.

> I think the error message ought be reformulated, so users have a chance
> to actually understand what they need to change to avoid the error. At
> least something roughly like "too many jobs for this platform's select()".

pgbench needs an extra fix then?

> ISTM that we should fail in ParallelSlotsSetup(), rather than
> ParallelSlotsGetIdle() though? That's always going to be earlier, and
> there's no way to get into the problematic situation at a later point,
> no?

Okay, done this way.  What do you think about the attached?
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15970: Db initialization error - initdb.exe and postgres not same version
Next
From: Andres Freund
Date:
Subject: Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclaredidentifier 'FD_SETSIZE'