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 1k2gDu-0002BB-3K for pgsql-general@arkaria.postgresql.org; Mon, 03 Aug 2020 19:34:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k2gDs-0001gZ-Ti for pgsql-general@arkaria.postgresql.org; Mon, 03 Aug 2020 19:34:12 +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 1k2gDs-0001gS-LU for pgsql-general@lists.postgresql.org; Mon, 03 Aug 2020 19:34:12 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k2gDp-0005Bt-3l for pgsql-general@postgresql.org; Mon, 03 Aug 2020 19:34:11 +0000 Received: by mail-qk1-x741.google.com with SMTP id b79so36204092qkg.9 for ; Mon, 03 Aug 2020 12:34:08 -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=Ft27/pF+AzOlWjLTWpD7K3CpJGC+pn+DATWEu2LI3pU=; b=189cQrI+EsXK2Q9239K4OZwf6SFd3ocZKYyLgSUWEsmttTCqFPEY/rM03GKNoKCCXd A6pXlIdCBu5WY+aohKfbSCwbj8INVEucVKVYB/Pf4sRUY2CRKhmzhTfoETehJwNy0SRN NY6zC+L51Ec+mF7hWQmJvMil4V/uoObTHTMy3OWCNCT0PDKXCA3cx35v8w6iJbrqUjJz 8ynMvL2LLP4hfICEkmOdHh/KwUmVuuEQavWtObCAn5uB0nk1sHFldcaylM5w+CtYw2as yYXuS7t0VmT8rFGsqlTDDCb3/34WBkoUfLoyjfqySZk7xY3pZfcz86lFM1VSH/B8yW8k n9GQ== 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=Ft27/pF+AzOlWjLTWpD7K3CpJGC+pn+DATWEu2LI3pU=; b=VjgQTzm4FPIDQCwi9t/wS6kGqT9oPdwbnEwNe9slZPEJBOAKCIig9aWxlq6XZbJSuC lGo339SLjtK9wvsEmUJgb9cpbgZnLgmD+JYQRvDTh6dVAVhUMrbe1LSj/q39I/o9eMqp Kja9iUq/TUqBudN+r5zJPp0ToL1yIQZN/scI2elr7PmFii/PJAq404uA3TRdi6bEEUKO NZarjWFllVQUUMeHdc3CPuO6aiQkpM4A7d3MdsamRXHf1iuyA3lzY6W/rG9c6mrfxYZd g5GkCco1rT5stxrj1We32KlHwNCpNY9/uXThnJ+vYKto5PoK2WwJQgC1PVo8jx/jqkqj M6dg== X-Gm-Message-State: AOAM533lTuzuf/Axa5bhsWduAqSV+bJ9bGLA4IXDnvP5fUhqZsKVCghs cUAQ9FKhACuBLwCpaGnOXy94TNGIJ66FANIybf+F1L2Ravr5dUDVvDgzwkvEVBXoS7uAO4DbE18 ITzE4AYtdTKo1TTz8v+6nQxeM6Lr/hAkZytTw/Lsp12jskKB2dBVWWPIl42ty7m8gHARZe2weuK iGS7KdSQ== X-Google-Smtp-Source: ABdhPJxgAPt62YCKUqdVsz+xhB57Ult9RVV4UkvTMebYeAsBubrMf4LR0J/LZeI8lg/htyWwhmZd1A== X-Received: by 2002:a37:61ce:: with SMTP id v197mr17986765qkb.44.1596483247573; Mon, 03 Aug 2020 12:34:07 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id w27sm21459064qtv.68.2020.08.03.12.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 12:34:06 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id EE29D2A0330; Mon, 3 Aug 2020 15:34:04 -0400 (-04) Date: Mon, 3 Aug 2020 15:34:04 -0400 From: Alvaro Herrera To: Ben Chobot Cc: pgsql-general Subject: Re: 12.3 replicas falling over during WAL redo Message-ID: <20200803193404.GA27773@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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: > rmgr: Btree       len (rec/tot):     72/    72, tx:   76396065, lsn: > A0A/AC4204A0, prev A0A/AC420450, desc: INSERT_LEAF off 48, blkref #0: rel > 16605/16613/60529051 blk 6501 > > So then I did: > > /usr/lib/postgresql/12/bin/pg_waldump -p /var/lib/postgresql/12/main/pg_wal/ > 0000000100000A0A000000AB 0000000100000A0A000000AD | grep > 16605/16613/60529051 Yep. Looking at the ones in block 6501, > rmgr: Btree       len (rec/tot):     72/    72, tx:   76393394, lsn: > A0A/AB2C43D0, prev A0A/AB2C4378, desc: INSERT_LEAF off 41, blkref #0: rel > 16605/16613/60529051 blk 6501 > rmgr: Btree       len (rec/tot):     72/    72, tx:   76396065, lsn: > A0A/AC4204A0, prev A0A/AC420450, desc: INSERT_LEAF off 48, blkref #0: rel > 16605/16613/60529051 blk 6501 My question was whether the block has received the update that added the item in offset 41; that is, is the LSN in the crashed copy of the page equal to A0A/AB2C43D0? If it's an older value, then the write above was lost for some reason. > pg_waldump: fatal: error in WAL record at A0A/AC5411B0: invalid resource > manager ID 110 at A0A/AC5411E0 > > ...and I have no idea what I'm looking at. I assume/hope the error at the > end is due to the db shutting down, and nothing to be particularly worried > about? Yeah. -- Įlvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services