- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitfdb60ca
committed
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'sadjust this code to read at most 1GB per call.(One would not have thought the file could get that big, but nowwe have a field report of trouble, so it can. We likely ought toadd some mechanism to limit the size of the query-texts fileseparately from the size of the hash table. That is not thispatch, though.)Per bug #17254 from Yusuke Egashira. It's been like this forawhile, so back-patch to all supported branches.Discussion:https://postgr.es/m/17254-a926c89dc03375c2@postgresql.org1 parent22a498b commitfdb60ca
1 file changed
+29
-16
lines changedLines changed: 29 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1876 | 1876 |
| |
1877 | 1877 |
| |
1878 | 1878 |
| |
| 1879 | + | |
1879 | 1880 |
| |
1880 | 1881 |
| |
1881 | 1882 |
| |
| |||
1916 | 1917 |
| |
1917 | 1918 |
| |
1918 | 1919 |
| |
1919 |
| - | |
1920 |
| - | |
1921 |
| - | |
1922 |
| - | |
1923 |
| - | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
1924 | 1923 |
| |
1925 |
| - | |
1926 |
| - | |
| 1924 | + | |
| 1925 | + | |
1927 | 1926 |
| |
1928 |
| - | |
1929 |
| - | |
1930 |
| - | |
1931 |
| - | |
1932 |
| - | |
1933 |
| - | |
1934 |
| - | |
1935 |
| - | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
1936 | 1949 |
| |
1937 | 1950 |
| |
1938 | 1951 |
| |
1939 | 1952 |
| |
1940 |
| - | |
| 1953 | + | |
1941 | 1954 |
| |
1942 | 1955 |
| |
1943 | 1956 |
| |
|
0 commit comments
Comments
(0)