Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8TpX-0003Ys-DX for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Jun 2016 14:42:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b8TpX-0003vJ-0m for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Jun 2016 14:42:39 +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.84_2) (envelope-from ) id 1b8TpW-0003to-AK for pgsql-bugs@postgresql.org; Thu, 02 Jun 2016 14:42:38 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b8TpT-0000uf-80 for pgsql-bugs@postgresql.org; Thu, 02 Jun 2016 14:42:37 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id A048121E4C; Thu, 2 Jun 2016 10:42:33 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Thu, 02 Jun 2016 10:42:33 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=bsuvTfTKYX0obVU ulHYOl5Okn5M=; b=VKuPPTEV1Be2RJZh4dH10RIRFHkv00PEZMimtZTcBj66uX+ Tt7tkplEwMbBPuRHAQHzrTrpMWQjl+5iqupidpgWfFmolkCUN+3r4STbtSTr9ewl JtHH6el+qywC1hYeYFkL/4xski62PwVy0j/CghdSkW07JR83xpDPr4RtRCw8= X-Sasl-enc: zC9usFt+L0jfprPoVLTS11vVbD57AlWqiz34Ts1HYBt6 1464878553 Received: from intern.anarazel.de (unknown [192.77.237.104]) by mail.messagingengine.com (Postfix) with ESMTPA id 519F6CCD9E; Thu, 2 Jun 2016 10:42:33 -0400 (EDT) Date: Thu, 2 Jun 2016 07:42:32 -0700 From: Andres Freund To: Michael Paquier Cc: timofeid@outlook.com, PostgreSQL mailing lists Subject: Re: BUG #14171: Wrong FSM file after switching hot standby to master Message-ID: <20160602144232.33gyusj2dekzk7cp@alap3.anarazel.de> References: <20160601134819.30392.85324@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2016-06-02 16:42:35 +0900, Michael Paquier wrote: > > Sometimes we have troubles with fsm-files. In case: > > • master instance is switching to another node(failover or switchover) on > > highload > > • Hot standby node restart and run as master succesfully. > > • After that we sometimes get FSM files pointing to non-existent blocks in > > the table, so subsequent insert operations on such tables fails with error > > message like following: 'could not read block XX in file "base/YYYY/ZZZZZ"'. > > The issue can be resolved by either deleting of wrong FSM file (while > > database is stopped) or performing VACUUM FULL on erroneous table. The > > problem is usually observed on relatively small tables (e.g. up to 30 > > blocks) which are often cleaned out (having most rows deleted). > > Does anybody already faced such behavior? What can be the root cause of such > > problems? Are there any recommendations on how to avoid them? > > Andres, do you think that c6ff84b0 can help here? Those symptoms look > rather similar to some missing invalidation messages on the standby. If there was a restart involved, it seems unlikely that that'll be relevant. Timofei, do I understand correctly that the problem persists across restarts? Regards, Andres -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs