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 1mxL6x-0003yo-Fv for pgsql-general@arkaria.postgresql.org; Wed, 15 Dec 2021 03:37:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mxL6w-0001N1-Ci for pgsql-general@arkaria.postgresql.org; Wed, 15 Dec 2021 03:37:46 +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 1mxL6w-0001Ms-2J for pgsql-general@lists.postgresql.org; Wed, 15 Dec 2021 03:37:46 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxL6u-0000wB-2Z for pgsql-general@postgresql.org; Wed, 15 Dec 2021 03:37:45 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id D0A9E3201126; Tue, 14 Dec 2021 22:37:41 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 14 Dec 2021 22:37:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=D0XDqrD0mleSObJBvkGFTE6afac qvaZ2UVaZ4Xjp5mM=; b=iA0X4MwV80Vhk1Ba12TM3nHH8veIXvQ55SDEt41M+39 jwpC0IwrE3UrYQIwMdZ8FtAZyvQ2MjCsZxVwEt05+5fNewhlYMaiK/dQXSZCTqMR nypMT9nwdcX/U3upt8QrOAD0gTz8oGldCXvscZEqGK7xfu8iy4XBKZWz9GSGquwn qeF9C4Pe4ieY9iAghUDc73Wf0fY2qQtJtj+2lmEsa06XlSNs/ALZUUz3GHhink/k I56CluEnqr7zTeU2WfI6B+ivqZKcqGtS+Flf62+4ZgAgaD4bS821ca8r94rDGEOH BY4wsWxv4LBYOcFu+lSgSaELGBRsIk2bY92+69SDWZA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=D0XDqr D0mleSObJBvkGFTE6afacqvaZ2UVaZ4Xjp5mM=; b=IUCfg4rSThAJOKCKLgZ7aq a/hzb1/jx8jDo8eGPwZAgmpHcytUT9T3ZXQ1krN4ab6jxobLb6U/IisqVH2ExCi+ /RXd1uhXUwnangRUEZbi955byFWujYsT6YZSiZIe78JbHJFz48QIMbbsBC9WLlQr Tw56cPq1HTOBnwqqzK4KoYcv/AhhFko6NMgr741J83ji7fTQFrlm4cKt2HxU/OvE 2EhTiNqh4Gu1um3lF8+Zh/WIRKiX+uwaojw2U0OIGOZXsq1NwMYpdK8IFO5A7VW3 22uJYMOM4OU1k+CSzDCsZ7F3OrycNOWbj9sZmwGNSKYbUp7c5rZSPO66ibJmltPg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrledugdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttdej necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepveefgfeugedvjeefjeffkefhfeet keelvdegvdefgeefudejuedtkeehiefgleeunecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Dec 2021 22:37:40 -0500 (EST) Date: Wed, 15 Dec 2021 12:37:35 +0900 From: Michael Paquier To: =?iso-8859-1?Q?Mart=EDn_Fern=E1ndez?= Cc: pgsql-general@postgresql.org Subject: Re: Reindex "locked" standby database Message-ID: References: <6C5D7205-487C-4AED-93AC-FBE042F51FC9@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IYqilAI3zmJRSpLc" Content-Disposition: inline In-Reply-To: <6C5D7205-487C-4AED-93AC-FBE042F51FC9@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --IYqilAI3zmJRSpLc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 15, 2021 at 12:15:27AM -0300, Mart=C3=ADn Fern=C3=A1ndez wrote: > The reindex went fine in the primary database and in one of our > standby. The other standby that we also operate for some reason > ended up in a state where all transactions were locked by the WAL > process and the WAL process was not able to make any progress. In > order to solve this issue we had to move traffic from the =E2=80=9Cbad=E2= =80=9D > standby to the healthy one and then kill all transactions that were > running in the =E2=80=9Cbad=E2=80=9D standby. After that, replication was= able to > resume successfully. You are referring to the startup process that replays WAL, right? Without having an idea about the type of workload your primary and/or standbys are facing, as well as an idea of the configuration you are using on both (hot_standby_feedback for one), I have no direct idea, but that could be a conflict caused by a concurrent vacuum. Seeing where things got stuck could also be useful, perhaps with a backtrace of the area where it happens and some information around it. > I=E2=80=99m just trying to understand what could have caused this issue. I > was not able to identify any queries in the standby that would be > locking the WAL process. Any insight would be more than welcome! That's not going to be easy without more information, I am afraid. -- Michael --IYqilAI3zmJRSpLc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmG5Yv8ACgkQnvQgOdby QH173xAApq3tQzoGLuvclxUpJ1zCn7AlORawaWMV6KSVlFZd3vacyA/qq/hxkZNe uQTazYWdeBxwqgAHLSRjZcw9VSKVyylid0CWwljxTKugGpSMsMZT5PZ3vE2OgCjZ e7n1sBYmw7l1r5kDylfMMrZwSyeeB32+aLapH23rxZdePbPWzEIIb2IrcNoWSL9+ /ShAjmFgxBx2NaYHhSUKfJX8BIhs3RLbN5qnwLad86THon+OQTB/8oKEwmb0UxzW h+8t0SdlRKdhhW4XeP1vIWZc6m/p3PBVYmlzvlf0Eqx7AUXuY25/P3V9f5UgVK5N x3sQpIkTTxZbFSZqXZ0YOI5c7eHVODTKu5ZnKwCyluJJ9MdXrFMlfIQMdAuNKKPg PeSNgXQShtJ/QEjt6c5mql4ToGG+Izy4LShkAQmYW6KEWum+RWMR/m9hxVjndzcj Cm0QQgDsoPDlZQnNhD2b3ZNPRTfQ192mOT6t1vvH3uqpVvX0kv+NVtpT+LJ2UJig 9o1/BYx5F1GapfdASVtEOGGhVCqWo//qlX16OlLTErUqUvs70/vHWwa+LqnoXcXw GCTe8ywKw5coQ+rHxnuieL102NYt2Ms/WurFABTOyxgUlH6WmogXKaJ2N82bWhmu ITpM7Vs+PkVweZs5y7XJzwQcs9AY972G7Qou4eYM5sfI+1xzy4k= =t4N9 -----END PGP SIGNATURE----- --IYqilAI3zmJRSpLc--