Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1swkSy-005qAb-Dq for pgsql-general@arkaria.postgresql.org; Fri, 04 Oct 2024 15:43:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1swkSx-001kEv-Q5 for pgsql-general@arkaria.postgresql.org; Fri, 04 Oct 2024 15:43:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1swkPm-001dTa-Nn for pgsql-general@lists.postgresql.org; Fri, 04 Oct 2024 15:40:23 +0000 Received: from fout-a2-smtp.messagingengine.com ([103.168.172.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1swkPh-002Wo8-SW for pgsql-general@lists.postgresql.org; Fri, 04 Oct 2024 15:40:21 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 49752138029D; Fri, 4 Oct 2024 11:40:17 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Fri, 04 Oct 2024 11:40:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1728056417; x=1728142817; bh=NfZubE9RwhD2ketuFshLiBegMVI5jfZMgT4tWUcsl/0=; b= nbSkKcPjh0kn9S6lI5stqxZQRbcNqSHoULXo5YwZ50VogsGpIDc/PTOOX4F7R5CZ t1sHFmkhJmgKx7s1uI3HR73d3OiZSlb1CvdgvYlXtefNVK5lAsVxhYXrvEHoP5em xIFAYQvlGpJ2HcP9h9nEy/rg82InG+Tiz0zxFlCFsYqqHAvtoZbEnlCtbQL3CIw/ GGHNKAj2/iLXSvTFRmBWpaIYdZz1pdEQ3BqDeoT7MjSS60GTGKqEMRwVAsT2jhS4 pTrD0Zm6ZOnCCW6qjVK1otFEFOsDncLNyTnX8ozfZPjUewhYq9RQgf4FzdPEz3c3 LylkB1KM4tPWNRs+wvxAlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728056417; x= 1728142817; bh=NfZubE9RwhD2ketuFshLiBegMVI5jfZMgT4tWUcsl/0=; b=i 6Yr9gLbaSfjiy7M4/z0etFG6w1e7HqfQXXBF9bTsXne6Bk/n5zbEYUzMzd+tA0cn 8WqwfPErAYlj7tOahvi9K5kIrK3+PKiiT/RV1+3DiAo+xbXdNrT5jXrdmOLr0xvA doO3DOy3LZofAl450n0u0eqnn9FTNcU4zbPYjjf/tHoD2UVS6QQKvExLI9SVZOYm 6LJCK1rdZTkM+25zXHrTBXiS/SxvwGNVUhy53JYjEsrma6OhLz/vhmBuzPcWZOEh 88vKrrOdiHPRqOx8ffGopqodJNjKsEpxZuvbEwvtTKxmq4Gu+vFdSsrck89w893U o3AEV0fIst24eYrtnmLlQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvfedgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeen ucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrse grkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeffleegieefgfevudehtdfh keeutdffjeevgeffgeejvedthefgudeiteefheejheenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhl rghvvghrrdgtohhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprh gtphhtthhopehmsggrrhgtiiihnhhskhhisehsthgrrhhfihhshhhsthhorhgrghgvrdgt ohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtgh hrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 4 Oct 2024 11:40:16 -0400 (EDT) Message-ID: <5f7d1eb6-10d7-4341-a366-421f45ef9297@aklaver.com> Date: Fri, 4 Oct 2024 08:40:15 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: How to troubleshoot: ERROR: cache lookup failed for type? To: =?UTF-8?Q?Marcin_Barczy=C5=84ski?= , pgsql-general References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/4/24 05:09, Marcin Barczyński wrote: > Hello! > > When reindexing a table, PostgreSQL returns the following errors for > two of its indexes: > > Index foo_idx1 on foo failed with error: failed to find parent tuple > for heap-only tuple at (1162372,1) in table "foo" > Index foo_idx2 on foo failed with error: failed to find parent tuple > for heap-only tuple at (1162372,1) in table "foo" > > When trying to show the tuple, there is another error message: > > SET enable_indexscan = OFF; > SET enable_tidscan = OFF; > SELECT ctid, xmin, xmax, * FROM sf.dir_current_part_8 WHERE ctid = > '(1162372,1)'; > > ERROR: cache lookup failed for type 1769235301 > > Searching for oid=1769235301 in pg_class, pg_type, pg_namespace and > pg_proc returned no results. > > It appears to be data corruption. > It's PostgreSQL 13 and unfortunately, data_checksums are turned off. What is the complete version number e.g. 13.x? What prompted the reindex of the table? Have there been any recent hardware/software issues on the machine? Does the Postgres log have any relevant information? Can you pg_dump -t sf.dir_current_part_8? What is the schema definition for sf.dir_current_part_8? > > I would appreciate any suggestions for troubleshooting this issue. > > -- > Marcin Barczyński > > -- Adrian Klaver adrian.klaver@aklaver.com