Re: PATCH: pgbench - option to build using ppoll() for larger connection counts
Rady, Doug <radydoug@amazon.com>
From: "Rady, Doug" <radydoug@amazon.com>
To: Andres Freund <andres@anarazel.de>, Fabien COELHO <coelho@cri.ensmp.fr>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Robert Haas <robertmhaas@gmail.com>
Date: 2018-03-21T05:42:33Z
Lists: pgsql-hackers
Attachments
- pgbench11-ppoll-v11.patch (application/octet-stream) patch v11
Updated the patch to not do the #undef
pgbench11-ppoll-v11.patch attached.
Thanks,
doug
On 3/3/18, 16:14, "Andres Freund" <andres@anarazel.de> wrote:
On 2018-03-01 11:30:39 +0100, Fabien COELHO wrote:
>
> > > -#ifdef HAVE_SYS_SELECT_H
> > > +#ifdef PGBENCH_USE_SELECT /* force use of select(2)? */
> > > +#undef HAVE_PPOLL
> > > +#endif
> > > +#ifdef HAVE_PPOLL
> > > +#include <poll.h>
> > > +#elif defined(HAVE_SYS_SELECT_H)
> > > +#define POLL_USING_SELECT
> >
> > (random thing noticed while going through patches)
> >
> > It strikes me as a bad idea to undefine configure selected
> > symbols. Postgres header might rely on them. It also strikes me as
> > entirely unnecessary here.
>
> Yes, I though about this one but let it pass. Indeed, it would be sufficient
> to not load "poll.h" when select is forced, without undefining the configure
> setting.
I've marked the CF entry waiting on author.
Greetings,
Andres Freund
Commits
-
Use ppoll(2), if available, to wait for input in pgbench.
- 60e612b60299 12.0 landed
-
Use pselect(2) not select(2), if available, to wait in postmaster's loop.
- 81069a9efc5a 10.0 cited