aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistbuild.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-10-31 19:13:48 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-10-31 19:13:48 -0400
commita667b066837849c5e55e0d626f1f7c93e267b8b7 (patch)
treeff020022aea79ff8c1344d461379f36aed373f8e /src/backend/access/gist/gistbuild.c
parentb21415595cace7f3a45cfeb3023359b4b4d56b85 (diff)
downloadpostgresql-a667b066837849c5e55e0d626f1f7c93e267b8b7.tar.gz
postgresql-a667b066837849c5e55e0d626f1f7c93e267b8b7.zip
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 now we have a field report of trouble, so it can. We likely ought to add some mechanism to limit the size of the query-texts file separately from the size of the hash table. That is not this patch, though.) Per bug #17254 from Yusuke Egashira. It's been like this for awhile, so back-patch to all supported branches. Discussion: https://postgr.es/m/17254-a926c89dc03375c2@postgresql.org
Diffstat (limited to 'src/backend/access/gist/gistbuild.c')
0 files changed, 0 insertions, 0 deletions