postgresql/src/bin
Tom Lane 60e612b602 Use ppoll(2), if available, to wait for input in pgbench.
Previously, pgbench always used select(2) for this purpose, but that's
problematic for very high client counts, because select() can't deal
with file descriptor numbers larger than FD_SETSIZE.  It's pretty common
for that to be only 1024 or so, whereas modern OSes can allow many more
open files than that.  Using poll(2) would surmount that problem, but it
creates another one: poll()'s timeout resolution is only 1ms, which is
poor enough to cause problems with --rate specifications approaching or
exceeding 1K TPS.

On platforms that have ppoll(2), which includes Linux and recent
FreeBSD, we can use that to avoid the FD_SETSIZE problem without any
loss of timeout resolution.  Hence, add configure logic to test for
ppoll(), and use it if available.

This patch introduces an abstraction layer into pgbench that could
be extended to support other kernel event-wait APIs such as kevents.
But actually adding such support is a matter for some future patch.

Doug Rady, reviewed by Robert Haas and Fabien Coelho, and whacked around
a good bit more by me

Discussion: https://postgr.es/m/23D017C9-81B7-484D-8490-FD94DEC4DF59@amazon.com
2018-09-24 14:40:58 -04:00
..
initdb Initialize random() in bootstrap/stand-alone postgres and in initdb. 2018-09-23 22:56:39 -07:00
pg_archivecleanup Don't fall off the end of perl functions 2018-05-27 09:08:42 -04:00
pg_basebackup Allow concurrent-safe open() and fopen() in frontend code for Windows 2018-09-14 10:04:14 +09:00
pg_config Translation updates 2018-05-21 12:29:52 -04:00
pg_controldata Translation updates 2018-06-25 12:37:18 +02:00
pg_ctl Implement "pg_ctl logrotate" command 2018-09-01 19:46:49 +03:00
pg_dump Remove dead code from pop_next_work_item(). 2018-09-17 12:43:07 -04:00
pg_resetwal Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:17 -04:00
pg_rewind Message style improvements 2018-09-13 23:35:43 +02:00
pg_test_fsync Translation updates 2018-05-21 12:29:52 -04:00
pg_test_timing Translation updates 2018-05-21 12:29:52 -04:00
pg_upgrade Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:17 -04:00
pg_verify_checksums Allow concurrent-safe open() and fopen() in frontend code for Windows 2018-09-14 10:04:14 +09:00
pg_waldump Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:17 -04:00
pgbench Use ppoll(2), if available, to wait for input in pgbench. 2018-09-24 14:40:58 -04:00
pgevent Update copyright for 2018 2018-01-02 23:30:12 -05:00
psql Get rid of explicit argument-count markings in tab-complete.c. 2018-09-21 20:50:41 -04:00
scripts Add semicolons to end of internally run queries 2018-08-30 19:23:22 +02:00
Makefile Allow on-line enabling and disabling of data checksums 2018-04-05 22:04:48 +02:00