pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Jawarilal, Manish <Manish.Jawarilal@dell.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: pgbench bug / limitation
Date: Fri, 05 Jun 2020 12:45:47 -0400
Message-ID: <1507639.1591375547@sss.pgh.pa.us> (raw )
In-Reply-To: <CAApHDvpDBkjj6a+Ld-9YGW=_Bcxss8Yyz_QYjtjus3WUsTb+1g@mail.gmail.com >
References: <BL0PR1901MB1985F219C46C61EDE7036C34ED8E0@BL0PR1901MB1985.namprd19.prod.outlook.com >
<7221.1590687090@sss.pgh.pa.us >
<BL0PR1901MB1985A8B4D3E5B39E32A9EA55ED8F0@BL0PR1901MB1985.namprd19.prod.outlook.com >
<10327.1590763515@sss.pgh.pa.us >
<BL0PR1901MB198583EAC6C8A3B770D20F1AED8A0@BL0PR1901MB1985.namprd19.prod.outlook.com >
<384920.1591027137@sss.pgh.pa.us >
<CAApHDvrjWtJa9oQ98oH+9PCvTgOkGZP+gcmottNX95sjn6o9fQ@mail.gmail.com >
<512846.1591057287@sss.pgh.pa.us >
<CAApHDvpMEAaZMxtzixbnb7ySo=Kb1eUfshEB-y4YOm8SgGrpiw@mail.gmail.com >
<alpine.DEB.2.22.394.2006021258170.87735@pseudo >
<CAApHDvpDBkjj6a+Ld-9YGW=_Bcxss8Yyz_QYjtjus3WUsTb+1g@mail.gmail.com >
David Rowley <dgrowleyml@gmail.com> writes:
> On Tue, 2 Jun 2020 at 23:27, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
>> Attached is a blind attempt at working around the issue based on what you
>> show below, that I cannot test.
> I suppose we might be able to do something like that. It does expose
> us to the implementation of Microsoft's fd_set struct, but surely the
> shape of that must be pretty much fixed since if it were to be changed
> then software that's already compiled would break.
More to the point, this does nothing to get around the O(N^2) cost of
adding N FDs to the fd_set with Microsoft's implementation; so I do not
think it's really going to fix the problem for people who want to use
lots of connections on Windows.
The idea that I vaguely had was to build our own array of socket FDs
(bypassing the unnecessary de-duplication logic in FD_SET) and then call
WaitForMultipleObjects() or similar directly. This would of course
be quite Windows-specific, which'd be annoying, but it seems like
getting out of using select() on Windows wouldn't be a bad thing.
Trying to make the same code work with two basically different models
of what a fd_set is seems like a recipe for pain. This would also get
us out from under the hack of redefining FD_SETSIZE.
Alternatively, if we're going to get in bed with the internals of
Windows' fd_set implementation anyway, we could implement our own
version of FD_SET that doesn't do the de-duplication.
regards, tom lane
view thread (26+ messages) latest in thread
Message-ID: <1507639.1591375547@sss.pgh.pa.us>
Permalink: ../1507639.1591375547@sss.pgh.pa.us/
Also on: postgresql.org/message-id/1507639.1591375547@sss.pgh.pa.us
copy link · copy postgr.es
reply 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, dgrowleyml@gmail.com, coelho@cri.ensmp.fr, Manish.Jawarilal@dell.com, pgsql-bugs@lists.postgresql.org
Subject: Re: pgbench bug / limitation
In-Reply-To: <1507639.1591375547@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