pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Don't try to read a multi-GB pg_stat_statements file in one call 7+ messages / 1 participants [nested] [flat]
* pgsql: Don't try to read a multi-GB pg_stat_statements file in one call @ 2021-10-31 23:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-31 23:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/a667b066837849c5e55e0d626f1f7c93e267b8b7 Modified Files -------------- contrib/pg_stat_statements/pg_stat_statements.c | 45 ++++++++++++++++--------- 1 file changed, 29 insertions(+), 16 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Don't try to read a multi-GB pg_stat_statements file in one call @ 2021-10-31 23:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-31 23:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7104e0b2457d1dc2d0e1c97e5053706e64a0fc50 Modified Files -------------- contrib/pg_stat_statements/pg_stat_statements.c | 45 ++++++++++++++++--------- 1 file changed, 29 insertions(+), 16 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Don't try to read a multi-GB pg_stat_statements file in one call @ 2021-10-31 23:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-31 23:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3a5b313ce74864303a8a5d6556b49d642c422922 Modified Files -------------- contrib/pg_stat_statements/pg_stat_statements.c | 45 ++++++++++++++++--------- 1 file changed, 29 insertions(+), 16 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Don't try to read a multi-GB pg_stat_statements file in one call @ 2021-10-31 23:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-31 23:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/16d0da5c8dda7340d6b1e724ad183313e6a254f2 Modified Files -------------- contrib/pg_stat_statements/pg_stat_statements.c | 45 ++++++++++++++++--------- 1 file changed, 29 insertions(+), 16 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Don't try to read a multi-GB pg_stat_statements file in one call @ 2021-10-31 23:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-31 23:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5dd067430b9d888196b7d69de7faba9db9bb006d Modified Files -------------- contrib/pg_stat_statements/pg_stat_statements.c | 45 ++++++++++++++++--------- 1 file changed, 29 insertions(+), 16 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Don't try to read a multi-GB pg_stat_statements file in one call @ 2021-10-31 23:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-31 23:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d87d5f8d8d3ae35c15c44ddb26bbc2b916f2bc12 Modified Files -------------- contrib/pg_stat_statements/pg_stat_statements.c | 45 ++++++++++++++++--------- 1 file changed, 29 insertions(+), 16 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Don't try to read a multi-GB pg_stat_statements file in one call @ 2021-10-31 23:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-31 23:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fdb60ca83d030e77f1e0db4646954d9eb8492ee4 Modified Files -------------- contrib/pg_stat_statements/pg_stat_statements.c | 45 ++++++++++++++++--------- 1 file changed, 29 insertions(+), 16 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2021-10-31 23:14 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-10-31 23:14 pgsql: Don't try to read a multi-GB pg_stat_statements file in one call Tom Lane <tgl@sss.pgh.pa.us> 2021-10-31 23:14 pgsql: Don't try to read a multi-GB pg_stat_statements file in one call Tom Lane <tgl@sss.pgh.pa.us> 2021-10-31 23:14 pgsql: Don't try to read a multi-GB pg_stat_statements file in one call Tom Lane <tgl@sss.pgh.pa.us> 2021-10-31 23:14 pgsql: Don't try to read a multi-GB pg_stat_statements file in one call Tom Lane <tgl@sss.pgh.pa.us> 2021-10-31 23:14 pgsql: Don't try to read a multi-GB pg_stat_statements file in one call Tom Lane <tgl@sss.pgh.pa.us> 2021-10-31 23:14 pgsql: Don't try to read a multi-GB pg_stat_statements file in one call Tom Lane <tgl@sss.pgh.pa.us> 2021-10-31 23:14 pgsql: Don't try to read a multi-GB pg_stat_statements file in one call Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox