Re: PATCH: pgbench - option to build using ppoll() for larger connection counts

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: "Rady, Doug" <radydoug@amazon.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Robert Haas <robertmhaas@gmail.com>
Date: 2018-01-29T08:58:59Z
Lists: pgsql-hackers
Hello Doug,

>    I'm not sure why you do the following trick, could you explain?
>       +#undef USE_SELECT
>       +#define USE_SELECT
>
> This was due to compiler complaint about USE_SELECT being redefined.
> Have replaced that "trick" with a new #define POLL_USING_SELECT which is used elsewhere in pgbench instead.

Ok, why not.

Another option to avoid the warning and a new name could have been to 
"#ifndef X #define X #endif /* !X */"

Patch applies cleanly, compiles cleanly for both options, local & global 
"make check" ok.

Switched to "Ready".

-- 
Fabien.


Commits

  1. Use ppoll(2), if available, to wait for input in pgbench.

  2. Use pselect(2) not select(2), if available, to wait in postmaster's loop.