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 1k1uUJ-0006NH-Tu for pgsql-general@arkaria.postgresql.org; Sat, 01 Aug 2020 16:35:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k1uUI-0005d7-Sz for pgsql-general@arkaria.postgresql.org; Sat, 01 Aug 2020 16:35:58 +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 1k1uUI-0005ai-H6 for pgsql-general@lists.postgresql.org; Sat, 01 Aug 2020 16:35:58 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k1uUG-0000wV-5O for pgsql-general@postgresql.org; Sat, 01 Aug 2020 16:35:57 +0000 Received: by mail-qt1-x843.google.com with SMTP id c12so16325093qtn.9 for ; Sat, 01 Aug 2020 09:35:55 -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=xo5Tw8b8rDCTgFwSpaidDLPgQELYLOqsgcyKpzy6cAw=; b=D/F8+9Sr/JvgMj4D1imL6iJ+7klYphXfTwGhGS7InAoKqljiCiMRKYdUKrT8vzTBZW mdD91C6GmpTUqpmXItROKwMM4WuEMpNxcnz/C7DvsmMC0x+F8LPyQAd7vfbkLI8D9p74 hGa8KEjnzep9JsMejapUohBwYmj8SX/op1YG7MYpclz5gyvODdlGrNk6JiThpOgz2j4c IKSlGkah9RRIrC5zLVcBNI+hDoEKCr8GSFaPcjbZbt41A1jVqjOCK3ENqaSN+T2I5b7s 9X2/vuzY2Up3eH7yGVDA671X4luaMgShTQ2oWBDTYd6B5bGo9tEP8mIhgR03OLDMCw1L fOMg== 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=xo5Tw8b8rDCTgFwSpaidDLPgQELYLOqsgcyKpzy6cAw=; b=mdhymXml/7srWkzYJ42K+brd0MPZX/2F52jD9Tt+tt6MTfAFXjLi2fdRHiJrfiewi4 J0a2067j+cbYx1yuOrsJpgH64CFwhi8CoPgo8z4FyHAgVnQVUGwiQ5QZtqbgSMsrHOWF BHRjfLEJZ2j+v47QW2SSKLXEI4NpUqZXFQTAXHFfH99TCkRf0FPs9eXrTTJm/dTmeEka C1kKd8o6pQ5n0IksmQ8BmxRU9Sxog+EPE/zYsnN1eiTUyN7/eKshvTr3IMjGKr8a6h8p /uSFwAhr1VmFi0+98F/Y9VFzyRNMPoWm5XDaYgTF2xqDQK97a26wOjOACwum5LS8tfLC ERCA== X-Gm-Message-State: AOAM530ClFqewVXXf9FifLur0tEMzeQjG2GsTM5xJ/8hSzUJpFm/pqnJ sNOtDlR/d5GHpLyRQQrL8dz3oBOjsBXrhOczvnkALzgATERRpbDavNqLtuoCrK38Z0f00CRt14v y54t6q1p6lbvnGDO9JJ3H8sboTp2C5YFt78e5FPvDA5fl8iHyYrWqmsZSXPSxqtheoh+kP7NYiG qIQ0QfMQ== X-Google-Smtp-Source: ABdhPJztbbgdFSMW0tM+APeZ0fyrriGG+9Oa2LXk3VaklrPcc7tnykuo3HSE61bS3pIVUZRQXP5psg== X-Received: by 2002:ac8:6c49:: with SMTP id z9mr9307023qtu.110.1596299754459; Sat, 01 Aug 2020 09:35:54 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id w2sm12144602qkf.6.2020.08.01.09.35.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Aug 2020 09:35:53 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id D9A912A3A79; Sat, 1 Aug 2020 12:35:51 -0400 (-04) Date: Sat, 1 Aug 2020 12:35:51 -0400 From: Alvaro Herrera To: Ben Chobot Cc: pgsql-general Subject: Re: 12.3 replicas falling over during WAL redo Message-ID: <20200801163551.GA12860@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8a8d6728-22ad-61ec-09f9-51f29b9a2f61@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-01, Ben Chobot wrote: > We have a few hundred postgres servers in AWS EC2, all of which do streaming > replication to at least two replicas. As we've transitioned our fleet to > from 9.5 to 12.3, we've noticed an alarming increase in the frequency of a > streaming replica dying during replay. Postgres will log something like: > > |2020-07-31T16:55:22.602488+00:00 hostA postgres[31875]: [19137-1] db=,user= > LOG: restartpoint starting: time 2020-07-31T16:55:24.637150+00:00 hostA > postgres[24076]: [15754-1] db=,user= FATAL: incorrect index offsets supplied > 2020-07-31T16:55:24.637261+00:00 hostA postgres[24076]: [15754-2] db=,user= > CONTEXT: WAL redo at BCC/CB7AF8B0 for Btree/VACUUM: lastBlockVacuumed 1720 > 2020-07-31T16:55:24.642877+00:00 hostA postgres[24074]: [8-1] db=,user= LOG: > startup process (PID 24076) exited with exit code 1| I've never seen this one. Can you find out what the index is being modified by those LSNs -- is it always the same index? Can you have a look at nearby WAL records that touch the same page of the same index in each case? One possibility is that the storage forgot a previous write. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services