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.98.2) (envelope-from ) id 1xMmyE-00000002CZ0-08Ic for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Oct 2026 13:48:38 +0000 Received: from localhost ([127.0.0.1]:60610 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xMmyC-0000000AHIY-280h for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Oct 2026 13:48:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:51906) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMmyC-0000000AHIQ-0qn2 for pgsql-bugs@lists.postgresql.org; Fri, 30 Oct 2026 13:48:36 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMmyA-00000001hgn-227A for pgsql-bugs@lists.postgresql.org; Fri, 30 Oct 2026 13:48:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 69UDmJEc2288828; Fri, 30 Oct 2026 09:48:19 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 sss.pgh.pa.us 69UDmJEc2288828 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sss.pgh.pa.us; s=default; t=1793368099; bh=GlNSt8upetO44ZThqrcSVQFt0lEo/l7YEsnaJgPGUNI=; h=From:To:cc:Subject:In-reply-to:References:Date:From; b=ufNul/GNXvGnyWX095vjUboKRrLY9fnvOJkHzITNy6SnYBNZZTmq0IR5goIlPc56I wIe3VI5FwW+i65rqwLM1FWTAqCYXBLnfVxuLWr7z+S3eXvzGtPDK5Uu1RU4zoavXeA UJSlxV6NtsAySzZMwuRzLkxpHhQPOxP5gKx7qNjg= From: Tom Lane To: Chris St Denis cc: David Geier , pgsql-bugs@lists.postgresql.org Subject: Re: crash in ltree_compare_distance() in 14.24 In-reply-to: <1990fc2d-c56a-4111-8444-6f8f1d66d1fd@ctgameinfo.com> References: <043a5139-1f0c-49df-b423-1cd129839aa9@ctgameinfo.com> <497fe0b6-2f8c-4237-b749-bed21de36c01@gmail.com> <3527d5c4-0ce4-4412-b433-2e1d36517139@ctgameinfo.com> <23946400-3809-499d-b0bc-5f859df8ef50@gmail.com> <1990fc2d-c56a-4111-8444-6f8f1d66d1fd@ctgameinfo.com> Comments: In-reply-to Chris St Denis message dated "Thu, 29 Oct 2026 23:16:04 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2288825.1793368099.1@sss.pgh.pa.us> Date: Fri, 30 Oct 2026 09:48:19 -0400 Message-ID: <2288826.1793368099@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Chris St Denis writes: > Data corruption is possible, I recently had an incident with it, however > my thinking was that if this was caused by corruption that the pg_dump > would also crash the server which is not happening. That assumption may > be incorrect. pg_dump is pretty insensitive to corruption in user-table indexes. It normally reads user tables only via full-table seqscans, which won't touch the indexes at all. In this case, we can assume that ltree_compare_distance is being asked to compute the distance between some ltree value in the index and one in local memory (a value to be inserted), and it seems it's being passed an incorrect pointer to the index entry, implying corruption in the index structure. > If corruption is the cause, can you give guidance on what I should do to > repair/validate that data? Which index should be rebuilt/etc? If you don't have a way to reproduce it, then there's not a lot we can do to investigate. I'd advise just reindexing the troublesome index and moving on. If you're unsure which is the troublesome index, reindexing all GIST indexes on ltree columns should be enough to deal with it. regards, tom lane