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 1k2kIB-0006tM-Q1 for pgsql-general@arkaria.postgresql.org; Mon, 03 Aug 2020 23:54:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k2kIA-0003kD-O0 for pgsql-general@arkaria.postgresql.org; Mon, 03 Aug 2020 23:54:54 +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 1k2kIA-0003k6-GY for pgsql-general@lists.postgresql.org; Mon, 03 Aug 2020 23:54:54 +0000 Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k2kI8-0007iV-87 for pgsql-general@postgresql.org; Mon, 03 Aug 2020 23:54:53 +0000 Received: by mail-qv1-xf44.google.com with SMTP id s15so13791523qvv.7 for ; Mon, 03 Aug 2020 16:54:51 -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=digd/FKufYS/jshAaMmIRYhFYfPpfY5DitHYDAX/PLY=; b=ufabjt0BOp0g/adR3fzPsA6nixjDdfXanYE9+cROnYPveHBOAKxOydmhV6IG1L5uS0 r1llyS2mvX909Dv94/OvhM2egGYWhD1it2xNg1YTp8H1k3O9bz0EaYiJPfNx6lyyAvTT 8af8oW4jYqRAW14fCePxcSA/7F6HCVb+NGNVsj1xvO0Ueb59Gh4CJXspNol9CorG2uw4 C9+zGMysxFw0qxXSqVZi8SEKu7XuPh4Va/dUdy2BYYHJPPLzdcEhNUOE8tS8UEIMQQ9s 9PVvfkAz3rwGX977S470WhMxyGJjiBYjArtEVKBfm30GIeQ37EuMHJavv7brRwxWnVi+ 0u7w== 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=digd/FKufYS/jshAaMmIRYhFYfPpfY5DitHYDAX/PLY=; b=L+Lwk4CxtN+UCoptthV7KfvGC4UmWwSAV3xzEa4Yae85wqp7IJECnhGv+Y5w3GvJYD 6Af02WAZ9JgORWdSHRC7mqxIBY2oteX13Bhb4uoVS6sa/+mbmPBHf9ifIEkgfRSzZ+Sp BIuQrDuljg9aAdw3/lTgmX5xSMWB24Ex8w/jHsqLRXAIdy4yJfNK/YlFJWV+LGGyHPrc FatfJkkBBozL3vwkPQ4kopg18MxTpptTfU7MCmZSZMRdk1HxwB23rqKVxdPHoVGovn4V YCcO3bzYYV+UGivf5CWX7c2SxRViFModjJWdhp0wKIN7XdP84bgKRZwZy68eRrkwxNsN oalg== X-Gm-Message-State: AOAM530Aj8aD91W2z/6nJdo4vGCPySrUhoq6PJ1GRiN2CLhPm3RErnD1 /R7jPbB4korReeZAAvqJAsotg0AZcYkNwznJ9sL8LWpshJWKoHQxtdlFETLbMkozHn6c6BVl0+t vIfHp+IdW9vDcmtBg21hEwx/k/fiQQhBwwjthRg708Zy821PxFhhsLGgSOHFwl/BdK8uqX7FmAO 5mBB0KKA== X-Google-Smtp-Source: ABdhPJwDGptIgiwL6qGeCR2F+wyb99jKkZZN4wfKE3obVAU3JYh5kgBhb3+fwsu7othVTrYh7nPUtg== X-Received: by 2002:a0c:e5c4:: with SMTP id u4mr19345892qvm.109.1596498890431; Mon, 03 Aug 2020 16:54:50 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id x28sm20941935qki.55.2020.08.03.16.54.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 16:54:49 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 48A402A03A0; Mon, 3 Aug 2020 19:54:48 -0400 (-04) Date: Mon, 3 Aug 2020 19:54:48 -0400 From: Alvaro Herrera To: Ben Chobot Cc: pgsql-general Subject: Re: 12.3 replicas falling over during WAL redo Message-ID: <20200803235448.GA1736@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9ba2cbd8-fa0b-cdd9-3eea-26b5418f20ce@silentmedia.com> 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-Aug-03, Ben Chobot wrote: > Alvaro Herrera wrote on 8/3/20 2:34 PM: > > On 2020-Aug-03, Ben Chobot wrote: > > dd if=16605/16613/60529051 bs=8192 count=1 seek=6501 of=/tmp/page.6501 > > If I use skip instead of seek.... Argh, yes, I did correct that in my test and forgot to copy and paste. >      lsn      | checksum | flags | lower | upper | special | pagesize | > version | prune_xid > --------------+----------+-------+-------+-------+---------+----------+---------+----------- >  A0A/99BA11F8 |     -215 |     0 |   180 |  7240 |    8176 |     8192 > |       4 |         0 > > As I understand what we're looking at, this means the WAL stream was > assuming this page was last touched by A0A/AB2C43D0, but the page itself > thinks it was last touched by A0A/99BA11F8, which means at least one write > to the page is missing? Yeah, that's exactly what we're seeing. Somehow an older page version was resurrected. Of course, this should never happen. So my theory has been proved. What now? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services