From: | Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> |
---|---|
To: | egashira(dot)yusuke(at)fujitsu(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17254: Crash with 0xC0000409 in pg_stat_statements when pg_stat_tmp\pgss_query_texts.stat exceeded 2GB. |
Date: | 2021-10-29 19:43:35 |
Message-ID: | CAC+AXB21yF41p4fWgUOkG1PBA-Ezw-8U0Q=Bint9OQ56qyMPYw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Thanks for the report.
On Fri, Oct 29, 2021 at 12:52 PM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:
>
> The MSDN documentation says that the upper limit of the _read() argument is
> INT_MAX (about 2GB), but the size gotten by fstat() exceeds this limit, so
> I
> think we encountered server crash by an exception error.
>
>
> https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/read?view=msvc-160
> > If buffer is NULL, or if buffer_size > INT_MAX, the invalid parameter
> handler is invoked.
>
> Until PostgreSQL 13, fstat() failed and returned ERROR when a file was
> larger than 2GB, but as a result of improvements to fstat() in PostgreSQL
> 14, it appears that _read() has exceeded its limit and now causes a crash.
>
> The value of MaxAllocHugeSize is being oversized when _WIN64 is defined
[1]. Shouldn't the limit for a slurp be MaxAllocSize?
[1]
https://docs.microsoft.com/en-us/cpp/c-runtime-library/data-type-constants?view=msvc-160
Regards,
Juan José Santamaría Flecha
From | Date | Subject | |
---|---|---|---|
Next Message | Kamigishi Rei | 2021-10-29 19:52:39 | Re: BUG #17245: Index corruption involving deduplicated entries |
Previous Message | Peter Geoghegan | 2021-10-29 19:41:47 | Re: BUG #17245: Index corruption involving deduplicated entries |