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 1ki7FI-0000ql-4q for pgsql-general@arkaria.postgresql.org; Thu, 26 Nov 2020 02:42:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ki7FH-0002jC-48 for pgsql-general@arkaria.postgresql.org; Thu, 26 Nov 2020 02:42:55 +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 1ki7FG-0002j5-9c for pgsql-general@lists.postgresql.org; Thu, 26 Nov 2020 02:42:54 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ki7FB-0004wL-P8 for pgsql-general@lists.postgresql.org; Thu, 26 Nov 2020 02:42:52 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 1F2155C00CE; Wed, 25 Nov 2020 21:42:47 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 25 Nov 2020 21:42:47 -0500 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:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=PLg4b5GN6RMNfr/eD GGw2pOkTPi8DHYMzyW9IwF4ass=; b=MHhRsNOkzrfltoryUBCR1kEvoAuJ6HY5n ce4lnkXV/yJiURHADM9ybtNfypVnsioI/KE0A8L0O37hP4P75OHSy1+xWsvQ3mui P/EXl9fSTf/AvCUsLKYzkl5UPFmNz/us/7WMfQKnI9Orc4BFbzyXYA3by2plgzN0 EmYTfF5tEBmxG2Xkl6sh0MAqok6UnF9omlR2enVfwqfRD/BPmjDsBZyQ1CnsZoB5 JODuZCBfS5ICFWkonGoVRbf9ZyV6SKfMzVp4wvBrymsqtLxIgBaYP2Hl2o8jTiA3 /pSZfNdJPerFnHL0O/0mju5Z5O2tH6tN86Lf6Wh+GaG2C4PQe9p/w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudehuddghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggujggfsehttdertddtredvnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeevgfelveegueejgefhgeetgefhgeehieefheehleetteei udeiiefhgffgheffteenucfkphepudeltddrleehrddukedrjeelnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhv hhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.18.79]) by mail.messagingengine.com (Postfix) with ESMTPA id C38883064AA6; Wed, 25 Nov 2020 21:42:46 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 651102A0D12; Wed, 25 Nov 2020 23:42:44 -0300 (-03) Date: Wed, 25 Nov 2020 23:42:44 -0300 From: Alvaro Herrera To: Huan Ruan Cc: pgsql-general@lists.postgresql.org Subject: Re: Potential BRIN Index Corruption Message-ID: <20201126024244.GA15675@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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-Nov-26, Huan Ruan wrote: > Hi All > > We cannot work out a reproducible case but we have a copy of the offending > database. I was hoping to know I think the way to debug this would be to see what WAL records have been emitted for the index, using pageinspect to find the problem index tuple. Use 'select ctid rrom large_table_with_623m_records where ...' to pinpoint the unindexed tuple's page number; see when (in LSN) was that tuple written; inspect WAL surroundings looking for updates (or lack thereof) for the BRIN index. Use pageinspect to examine raw brin data.