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 1kDxvo-0006qg-QP for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2020 22:42:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kDxvm-00089e-Bk for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2020 22:42:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDxvm-00089S-4V for pgsql-hackers@lists.postgresql.org; Thu, 03 Sep 2020 22:42:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDxvg-0004PU-0b for pgsql-hackers@lists.postgresql.org; Thu, 03 Sep 2020 22:42:09 +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 083Mg28o796880; Thu, 3 Sep 2020 18:42:02 -0400 From: Tom Lane To: Alvaro Herrera cc: Pg Hackers Subject: Re: report expected contrecord size In-reply-to: <20200903223308.GA25785@alvherre.pgsql> References: <20200903223308.GA25785@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 03 Sep 2020 18:33:08 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <796878.1599172922.1@sss.pgh.pa.us> Date: Thu, 03 Sep 2020 18:42:02 -0400 Message-ID: <796879.1599172922@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2020-Sep-03, Tom Lane wrote: >> Uh ... is it really possible for gotlen to be more than total_len? >> (I've not looked at the surrounding code here, but that seems weird.) > Well, as I understand, total_len comes from one page, and gotlen comes > from the continuation record(s) in the next page(s) of WAL. So if > things are messed up, it could happen. (This *is* the code that > validates the record, so it can't make too many assumptions.) Got it. No further objections. regards, tom lane