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 1kEGwu-0005C4-OZ for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Sep 2020 19:00:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kEGwt-0002j0-Mh for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Sep 2020 19:00:35 +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 1kEGwt-0002it-By for pgsql-hackers@lists.postgresql.org; Fri, 04 Sep 2020 19:00:35 +0000 Received: from mail-qv1-xf42.google.com ([2607:f8b0:4864:20::f42]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kEGwp-0006li-U1 for pgsql-hackers@lists.postgresql.org; Fri, 04 Sep 2020 19:00:34 +0000 Received: by mail-qv1-xf42.google.com with SMTP id x7so3544510qvi.5 for ; Fri, 04 Sep 2020 12:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=MLEu+7FSHOqeGzLb713mNQvflHbJ08RNyKZEzntRtos=; b=W24IOnza3KDtR2WsLp5bbxZgWHsvJhdgDYv1kcwkQIM6Z402pJsW9hq4Q7r/xZiHH6 ahoQndCkACBE0FZM0klZA8r1nrI3tCSYbDBkjDXWooi2LKK8V/YyqrZ+//DhPw120V+h yqCkARHhgICkjlMNHjDx2RZSvPm5AWSOAIlqr+Ujvugy1kbXFEG6zc/3upFQaLhwGWIi CMjkg2bbbtUM6+vnTcuLGzCysEW+Mq0vEiqzTApiwZ4fnWyRqnViUCToSEhly64PI43K V6hHtth43OW5pvqe7wufkdJuoVTqQdhOFSdURp8XHIkUhr5RB3hojlKdYeDP6uCoN/0l bG6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=MLEu+7FSHOqeGzLb713mNQvflHbJ08RNyKZEzntRtos=; b=G00O1TuwlgNFqO+uCngsHNTbjMVVOuQ2gB1g6i/Fy5R0kl9tvejov/rQZ5sSroAW1t y/SlN8bGOqFMNteBFL18PpmR+WJLUhnK6TS1yFYHO6WZ7z1m+S/q3VOvkbxEiRSLv7rH XdaNTUEJnNDBbdTYwE7W4TueCkpHtFIt/30KOWMkzn5agidj4lVsDsKtUelRLzOWfWYQ BjwRkimmLZb4STbFDc/K/WEPSMsnwS0PcQLgiUxISd6C69TnFkqe2eAr9iqldDrPXMK+ XT+xWkMdwJsLtOI7Oni/ZU6yBj+uL65JcZWiYWF7/ozL4BdTrWDb1hxUhuOOxFE2YJlJ 5W6w== X-Gm-Message-State: AOAM531HXn8iIyloEEhzo0ssGkD3TxzdQ/H//BoqsXQEIXoDqVe5YB8C TR9ml44dfAn5ToH8KRrisHaO/0Mey/NjVBgjBSg9MceHSLEfNDOuow0R82C5vNTMHgcFpUzQI3/ MecLbvlgbCRyhpqALMbKepDEtwwQiX+5wcdCj8AlWcmSxNi6HZVNzfPXrHg7OsAHU3JjfW0cNPv ZxlKheiQAi2KpLUnoa X-Google-Smtp-Source: ABdhPJyGJu2Wh+yz/PfwZNA/lBKt9dzjieLsZlS9s0JUM+8gGaISO/u1hKcGgqCy+o0u/J81mLw1TQ== X-Received: by 2002:ad4:4f48:: with SMTP id eu8mr9385211qvb.40.1599246029103; Fri, 04 Sep 2020 12:00:29 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id t69sm4982108qka.73.2020.09.04.12.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 12:00:28 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 038E72A1598; Fri, 4 Sep 2020 15:00:27 -0400 (-04) Date: Fri, 4 Sep 2020 15:00:26 -0400 From: Alvaro Herrera To: Tom Lane Cc: Pg Hackers Subject: Re: report expected contrecord size Message-ID: <20200904190026.GA5193@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <796879.1599172922@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Sep-03, Tom Lane wrote: > 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. Many thanks for looking! Pushed now. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services