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 1qfush-00DapE-Js for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Sep 2023 04:20:07 +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 1qfusf-005404-1G for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Sep 2023 04:20:04 +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 1qfuse-0053zk-NX for pgsql-hackers@lists.postgresql.org; Tue, 12 Sep 2023 04:20:04 +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 1qfusb-00455Y-7b for pgsql-hackers@postgresql.org; Tue, 12 Sep 2023 04:20:03 +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 38C4JrIR2728719; Tue, 12 Sep 2023 00:19:53 -0400 From: Tom Lane To: Michael Paquier cc: Hongxu Ma , Jelte Fennema , "David G. Johnston" , PostgreSQL Hackers Subject: Re: PSQL error: total cell count of XXX exceeded In-reply-to: References: Comments: In-reply-to Michael Paquier message dated "Tue, 12 Sep 2023 12:55:44 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2728717.1694492393.1@sss.pgh.pa.us> Date: Tue, 12 Sep 2023 00:19:53 -0400 Message-ID: <2728718.1694492393@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Tue, Sep 12, 2023 at 02:39:55AM +0000, Hongxu Ma wrote: > + long total_cells; > long is 4 bytes on Windows, and 8 bytes basically elsewhere. So you > would still have the same problem on Windows, no? More to the point: what about the multiplication in printTableInit? The cat's been out of the bag for quite some time before we get to printTableAddCell. I'm more than a bit skeptical about trying to do something about this, simply because this range of query result sizes is far past what is practical. The OP clearly hasn't tested his patch on actually overflowing query results, and I don't care to either. regards, tom lane