pgsql: Don't try to read a multi-GB pg_stat_statements file in one call

2021-10-31 Thread Tom Lane
Don't try to read a multi-GB pg_stat_statements file in one call. Windows fails on a request to read() more than INT_MAX bytes, and perhaps other platforms could have similar issues. Let's adjust this code to read at most 1GB per call. (One would not have thought the file could get that big, but

pgsql: Don't try to read a multi-GB pg_stat_statements file in one call

2021-10-31 Thread Tom Lane
Don't try to read a multi-GB pg_stat_statements file in one call. Windows fails on a request to read() more than INT_MAX bytes, and perhaps other platforms could have similar issues. Let's adjust this code to read at most 1GB per call. (One would not have thought the file could get that big, but

pgsql: Don't try to read a multi-GB pg_stat_statements file in one call

2021-10-31 Thread Tom Lane
Don't try to read a multi-GB pg_stat_statements file in one call. Windows fails on a request to read() more than INT_MAX bytes, and perhaps other platforms could have similar issues. Let's adjust this code to read at most 1GB per call. (One would not have thought the file could get that big, but

pgsql: Don't try to read a multi-GB pg_stat_statements file in one call

2021-10-31 Thread Tom Lane
Don't try to read a multi-GB pg_stat_statements file in one call. Windows fails on a request to read() more than INT_MAX bytes, and perhaps other platforms could have similar issues. Let's adjust this code to read at most 1GB per call. (One would not have thought the file could get that big, but

pgsql: Don't try to read a multi-GB pg_stat_statements file in one call

2021-10-31 Thread Tom Lane
Don't try to read a multi-GB pg_stat_statements file in one call. Windows fails on a request to read() more than INT_MAX bytes, and perhaps other platforms could have similar issues. Let's adjust this code to read at most 1GB per call. (One would not have thought the file could get that big, but

pgsql: Don't try to read a multi-GB pg_stat_statements file in one call

2021-10-31 Thread Tom Lane
Don't try to read a multi-GB pg_stat_statements file in one call. Windows fails on a request to read() more than INT_MAX bytes, and perhaps other platforms could have similar issues. Let's adjust this code to read at most 1GB per call. (One would not have thought the file could get that big, but

pgsql: Don't try to read a multi-GB pg_stat_statements file in one call

2021-10-31 Thread Tom Lane
Don't try to read a multi-GB pg_stat_statements file in one call. Windows fails on a request to read() more than INT_MAX bytes, and perhaps other platforms could have similar issues. Let's adjust this code to read at most 1GB per call. (One would not have thought the file could get that big, but