- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitd38bab5
committed
pgbench: Increase RLIMIT_NOFILE if necessary
pgbench already had code to check if the soft rlimit is too low for thespecified number of connections. If too low, it errored out, telling the userto increase the limit.However, we can do better: If the hard limit allows, increase the soft limitto be sufficiently for the number of connections.It is common for the soft limit to be considerably lower than the hard limit,due to the danger of soft limits > 1024 breaking programs that use theselect(2), as explained in [1].[1]:https://0pointer.net/blog/file-descriptor-limits.htmlAuthor: Jelte Fennema-Nio <postgres@jeltef.nl>Reviewed-by: Andres Freund <andres@anarazel.de>Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/CAGECzQQh6VSy3KG4pN1d%3Dh9J%3DD1rStFCMR%2Bt7yh_Kwj-g87aLQ%40mail.gmail.com1 parent9b1cb58 commitd38bab5
1 file changed
+15
-2
lines changedLines changed: 15 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6815 | 6815 |
| |
6816 | 6816 |
| |
6817 | 6817 |
| |
6818 |
| - | |
| 6818 | + | |
| 6819 | + | |
6819 | 6820 |
| |
6820 | 6821 |
| |
6821 |
| - | |
| 6822 | + | |
6822 | 6823 |
| |
6823 | 6824 |
| |
6824 | 6825 |
| |
| 6826 | + | |
| 6827 | + | |
| 6828 | + | |
| 6829 | + | |
| 6830 | + | |
| 6831 | + | |
| 6832 | + | |
| 6833 | + | |
| 6834 | + | |
| 6835 | + | |
| 6836 | + | |
| 6837 | + | |
6825 | 6838 |
| |
6826 | 6839 |
| |
6827 | 6840 |
| |
|
0 commit comments
Comments
(0)