Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1LTT-0001qg-Su for pgsql-general@arkaria.postgresql.org; Thu, 29 Mar 2018 00:31:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f1LTS-0004IV-RS for pgsql-general@arkaria.postgresql.org; Thu, 29 Mar 2018 00:31:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1LTS-0004IM-JZ for pgsql-general@lists.postgresql.org; Thu, 29 Mar 2018 00:31:26 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1LTL-00047D-Dt for pgsql-general@lists.postgresql.org; Thu, 29 Mar 2018 00:31:26 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id CE95B211C6; Wed, 28 Mar 2018 20:31:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 28 Mar 2018 20:31:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=eANrsAxhMJQHcdEflRdNHCWCeQZD+al0cFy6B1Bp8+8=; b=Pv/QQQaG UUDZXkS6+z73gED4/jw0v/RJVl3NOm3a1Mjm/+44bWmUu0YfUkM0WTlgCOp8fVUA DaP/SUMfWxXBnXQZwHRQmKMT8HY5scoRRMyi5lzQlpp2eb8WR8iLuzdCj9MJVAMm s4oxTVIu9UbjBFbWra4W4Z7ZD94nhEoYfwx30Hdv8c8+7YTC8EfLKwhYXi2HbLhp SBNBMOHasn9B6U1w1jKpiza5nBgKM6Rub10CFyZjVQ0+tVRDifg91JuZHOPUqjdY DkrFMVjQ2nfwX1hwixpnEkiZ4vRC7mOwwOPVOdl4z6oqooDku0ak3JQmIxwxOeFv GoMGX/mzCfuzCA== 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-sender :x-me-sender:x-sasl-enc; s=fm2; bh=eANrsAxhMJQHcdEflRdNHCWCeQZD+ al0cFy6B1Bp8+8=; b=YOlzzVtbUMwjRrAPsijfJI9V5qZKbSS+EFtu+ROh5F5KN RksU2x3osD3RfZtGrVz8WTmx3BPjFgG7scSSfRRJ23nM3BNMkIMbwTdhsG3UjB71 NJXKCyPUzdS1tRDIn4EH9ADQCJsk5l1sxrvVM+hSiAIhnI4B7tsWLXenAjC10mTu 9T7Jf5FWZLsEPEGWbm9YJflOP4/8HsblJI4E8snNgapWBB9SaqQlxBI6F/tvepwG TUX/iyqTCPHW2wJemmMgu/hoEUeJPdhBv8E+i3Nl1+VUtSYGELMx02Np+6gc6DSc EmSm+hVBtUbwQF26XP0gfcZw8j+Ag4PjfKgEmMF6A== X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 63343E443C; Wed, 28 Mar 2018 20:31:16 -0400 (EDT) Date: Thu, 29 Mar 2018 09:31:13 +0900 From: Michael Paquier To: raj 1988 Cc: pgsql-general@lists.postgresql.org Subject: Re: pg_ctl promote causes error "could not read block" (PG 9.5.0 and 9.5.4) Message-ID: <20180329003113.GE2102@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qFgkTsE6LiHkLPZw" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --qFgkTsE6LiHkLPZw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 28, 2018 at 09:36:11AM -0700, raj 1988 wrote: > Are we hitting some bug? tried to look around but not able to confirm if we > are hitting a bug or not. For us this is happening consistently on > different servers whenever we do pg_ctl promote and then it block WRITE on > that table. This has the strong smell of the FSM bug fixed in 9.5.5: https://www.postgresql.org/docs/devel/static/release-9-5-5.html So, in order to get things right: 1) Update to the latest version of Postgres 9.5. 2) Make sure that your cluster gets in a clean state. There are instructions here: https://wiki.postgresql.org/wiki/Free_Space_Map_Problems > As of now we get rid of the error either by doing vacuum full or CTAS, but > i am afraid what we will do in case this happens to our few TB tables. This rebuilds the file-space map, which is why it goes away. You really want to do the work I am mentioning above to get back to a clean state. -- Michael --qFgkTsE6LiHkLPZw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlq8M9EACgkQnvQgOdby QH27ehAAguQeAVJ+HvfSFARhvSd381/BlWiTpZcfkt69x3LOFWfQHd6egXYynyyw CbMR4XbtUFfmUXZ+gHrABMqfJo4xkMqKinIzk6CVAigttRpqJJ1s+5j274Pm375+ waYayre2DTiMo3PKmj4LHxDQtmW/2FM76L3X266vLaj5MeTT9kd7oWuWseu3xFQv ndkKN4PIcvBsDFJwDgjsZZiHehqHcQXy2VJSYCBGSWMPu2kiemHjy4YgX0Kz0iGi 8IiDA5fV8Jqr56irIKXUFIgw/J0vZoPsfoi5i6IOt2GY4HjhMfnaYu8FNT0Qk8TD 3q37Xi7vRdnloLHeczGWkUW0DCjghlejVkiMf2hzGoy6ORRkaVDy5thZCpF6Pg5k rZj5QT9F2aMxKBVEyjDvo8W2imIAk+yrktsMZ6BLZKabjkNp+LhPEdcTUhCxymIM KsGWFhcAFEvbm+vQ601j4KKpCWZEHBanr5zANPlWhb+d3muBcuf6SxIr4e+C6+NH +vxAquTVgylS26FY9/gr3TTfbW6YU5G2Er4rzK/r1tDuFVIRmTrsu+V0HPfqeeOD kd0rEZIvDCOF0eSWKpWC38I2JglX0uIqOh8J/Lkga3xo6XH80SxG0DqfmywYxz1T IT2khfHWdqC1zK+PQ1KYc9TA6O+ZMB6sVIx5tudjEXTHMc4K5II= =+ffp -----END PGP SIGNATURE----- --qFgkTsE6LiHkLPZw--