Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhJb7-0003fJ-Qf for pgsql-bugs@arkaria.postgresql.org; Sun, 31 Oct 2021 22:46:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mhJb5-0005pp-Vm for pgsql-bugs@arkaria.postgresql.org; Sun, 31 Oct 2021 22:46:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhJb5-0005pf-OW for pgsql-bugs@lists.postgresql.org; Sun, 31 Oct 2021 22:46:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhJb4-0003V1-1E for pgsql-bugs@lists.postgresql.org; Sun, 31 Oct 2021 22:46:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 19VMkYq11052017; Sun, 31 Oct 2021 18:46:34 -0400 From: Tom Lane To: =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= cc: egashira.yusuke@fujitsu.com, PostgreSQL mailing lists Subject: Re: BUG #17254: Crash with 0xC0000409 in pg_stat_statements when pg_stat_tmp\pgss_query_texts.stat exceeded 2GB. In-reply-to: References: <17254-a926c89dc03375c2@postgresql.org> <840436.1635611203@sss.pgh.pa.us> <856857.1635627048@sss.pgh.pa.us> <975808.1635700062@sss.pgh.pa.us> Comments: In-reply-to =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= message dated "Mon, 01 Nov 2021 00:34:15 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1052014.1635720394.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 31 Oct 2021 18:46:34 -0400 Message-ID: <1052015.1635720394@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =3D?UTF-8?Q?Juan_Jos=3DC3=3DA9_Santamar=3DC3=3DADa_Flecha?=3D writes: > On Sun, Oct 31, 2021 at 6:07 PM Tom Lane wrote: >> Here's a quick patch for that. I don't have any ability to check it >> on Windows, but the logic is easy to verify by reducing the arbitrary >> constant to something small. (I used 1GB, not INT_MAX, because I figur= ed >> we ought to read in multiples of a filesystem block if possible.) > I have tested the patch in Windows and it works as expected. Great, thanks for testing! regards, tom lane