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 1f3lKe-0005gZ-Cg for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Apr 2018 16:32:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3lKd-0005y5-Bn for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Apr 2018 16:32:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3lKc-0005xw-83 for pgsql-bugs@lists.postgresql.org; Wed, 04 Apr 2018 16:32:19 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3lKY-0002Qb-Pa for pgsql-bugs@lists.postgresql.org; Wed, 04 Apr 2018 16:32:16 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 7EC5216BB; Wed, 4 Apr 2018 12:32:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 04 Apr 2018 12:32:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=q+pMOllK7zphsV6A5 qWa5AX3RVsAxsSb5nLROphjvm0=; b=fJlXleNsW59w1vYtmRx/Y5w8i2l/lKuqv CeoOm1KMUNt+mUmcNeKiIkk5TsApwHUtFBxexwP7a0T6dq5zZ/PGCSTsDvETxUMk pb89ui1/aMqv9yMHtyoBD1px6YIRxKFzbjfHCk0EIVfpaGSdJ4jz4RP0e6Q0Ft9Q 9LNlDSSXqnjLvfUk7270Y54jvQbinnDOxXnya8DQtle+JTXeC19brKEY6iNtXe0C g8bW1+mFJQxOqk0MSXNDHe72BolupcTPjHUfjslHG+76BzUKYQF/ihT5lWhMWWDa 2YoH6iphWgXSBdODZCCbwkeWizW+7hViQ2wDhM1e2LUx+ek1JovXw== X-ME-Sender: Received: from alvin.alvh.no-ip.org (unknown [179.56.29.253]) by mail.messagingengine.com (Postfix) with ESMTPA id BE41DE4853; Wed, 4 Apr 2018 12:32:11 -0400 (EDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id A97605A7; Wed, 4 Apr 2018 13:32:09 -0300 (-03) Date: Wed, 4 Apr 2018 13:32:09 -0300 From: Alvaro Herrera To: Andrew Gierth Cc: molofeev , Tomas Vondra , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15142: ERROR: MultiXactId nnnnn has not been created yet -- apparent wraparound in v9.5 Message-ID: <20180404163209.xmowtj3goudfgs3z@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87woxnj75g.fsf@news-spur.riddles.org.uk> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Gierth wrote: > >>>>> "Alvaro" == Alvaro Herrera writes: > > >> Query 1:  select * from heap_page_items(get_raw_page('tablename',3220145)); > > Alvaro> In this one, t_infomask is 11011 for all the tuples, which is > Alvaro> 0x2B03. HEAP_XMAX_IS_MULTI is 0x1000. I think you're looking at > Alvaro> the wrong pages, probably because of synchronized_seqscans. > > 3220145 appears to be a valid page (it's the one with the last > selectable row in the last slot). Ah. > It's 3220146 which looks corrupt, but it's corrupt in such a way that > heap_page_items doesn't report anything interesting because all the > lp_len fields are 16. /me scratches head > My working hypothesis is that page 3220146 has actually been overwritten > by a page from some index, which is why it looks like valid (but too > short) items. I guess that'd also explain why there are so many tuples -- beyond the maximum for heap pages. > The multixact error occurs because pg is reading garbage from the xid > and infomask fields since those don't exist in index tuples. Ouch. I had never seen this. Maybe the OP can ship the page image? May contain private data, though. Maybe try to read with with bt_page_items() and/or other index methods to confirm the theory? I would guess that this is some sort of storage error -- a SAN or RAID controller that malfunctions, or something like that. This I've seen. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services