Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rDykZ-003lsi-Q1 for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Dec 2023 03:20:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rDykY-00EkAb-Bi for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Dec 2023 03:20:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rDykY-00Ek3I-2H for pgsql-bugs@lists.postgresql.org; Fri, 15 Dec 2023 03:20:30 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rDykR-00AScz-G1 for pgsql-bugs@lists.postgresql.org; Fri, 15 Dec 2023 03:20:28 +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 3BF3KLGr2903193; Thu, 14 Dec 2023 22:20:21 -0500 From: Tom Lane To: RekGRpth cc: Richard Guo , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18247: Integer overflow leads to negative width In-reply-to: References: <18247-11ac477f02954422@postgresql.org> <2781181.1702565025@sss.pgh.pa.us> Comments: In-reply-to RekGRpth message dated "Fri, 15 Dec 2023 08:13:44 +0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2903191.1702610421.1@sss.pgh.pa.us> Date: Thu, 14 Dec 2023 22:20:21 -0500 Message-ID: <2903192.1702610421@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk RekGRpth writes: > How bad would it be if, after overflowing, the width value was within > the allowed range? Really pretty negligible, I should think. You might get a not-great choice of plan. As Richard noted, there are some Asserts you could hit; but not in a production build. regards, tom lane