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 1uzH4Y-001dXq-Qi for pgsql-general@arkaria.postgresql.org; Thu, 18 Sep 2025 16:01:26 +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 1uzH4X-0008Q8-9o for pgsql-general@arkaria.postgresql.org; Thu, 18 Sep 2025 16:01:25 +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 1uzH4W-0008Pz-Uv for pgsql-general@lists.postgresql.org; Thu, 18 Sep 2025 16:01:24 +0000 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uzH4S-001XDx-1m for pgsql-general@lists.postgresql.org; Thu, 18 Sep 2025 16:01:24 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id CC84B1400226; Thu, 18 Sep 2025 12:01:19 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Thu, 18 Sep 2025 12:01:19 -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=fm3; t=1758211279; x=1758297679; bh=ODmce08isqpqkv/VRi1C5XDF4RpjP9bxZR1fXRRq+zE=; b= L0wE/67n4n2L+f1ozIfYrOHfhmzCl+eKCTq1DWeZFObuJugKLFSnuEob1g0+Awmj rfCJjx1ILIeBMvv7VQByO58dGz2XfF0OMioGbTm3fllXgiSsIk6TSWAcrpMW0fMF Mt1UPzgkVbw+46ckAaVqOVfia3M28HpthyZlssNv1NpA7buwyxerelmeOlZECuHO 3klubybwbt8aIWBHdZzclmZI02bV0R2ZApp+1zm9YHsaS8fcEVUUHfO5yQW8KLh6 glm5PiQpvsbUHd8X3BQuzjFjT8Fgu1Iei3qT7xzRpnhC+QvTpRyaMdNhmsfzUqut 5PEdq2bgoHEjlwqeiunPzA== 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-sender :x-me-sender:x-sasl-enc; s=fm1; t=1758211279; x=1758297679; bh=O Dmce08isqpqkv/VRi1C5XDF4RpjP9bxZR1fXRRq+zE=; b=TiRxfRYZQ076aCedB jAug/YEeosnKVGgOe5HOt07TJj1kVSALIVk1jW++qE29TsT3ZzgIzFsdOcQ36Lv1 yBRoSU9nHXSsjPBSiwNfy9UQpY0KsDFgF1lP99GcD3P1rxwjZjr2qYG0yfDO2y41 aHPBftaRKAtuGOM7cqq2yJKv7PcS3cUL80oXzkJrjjAg2CixvxTxaH55OMLDI/Bv u/G6JL44yarVtTg9ezYPWiCACQpV7jrwJldxUGIC9XhvrDP0cwonWwXKLMWSG+tc /FbovLX0vZ9y1ljzR7EDEbVvGbWwMUeUGrVvXWktL+uY6onmwzT3NEYuPM4d0IP7 SyNYg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdegieejiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgrnhcu mfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqne cuggftrfgrthhtvghrnhepiefhgeevleeggeefgfeujeehgeejfeduvedvfeejuddvtdeu feejgfdtteekjefgnecuffhomhgrihhnpehksggtrdgtohhmnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhes rghklhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouh htpdhrtghpthhtohepfihimhdrrhhouhhquhgrrhhtsehksggtrdgsvgdprhgtphhtthho pehpghhsqhhlqdhgvghnvghrrghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 18 Sep 2025 12:01:18 -0400 (EDT) Message-ID: <1bfa0b6b-11a8-458f-a3f3-3f86574abc1d@aklaver.com> Date: Thu, 18 Sep 2025 09:01:18 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Index (primary key) corrupt? To: Wim Rouquart , "pgsql-general@lists.postgresql.org" 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 9/18/25 05:25, Wim Rouquart wrote: > Internal > > > Hello, > > When doing a pg_dump of one of our databases one of the tables primary > keys doesn’t get exported. Pg_dump just skips this index, without any > warning whatsoever (verbose mode was used to doublecheck). What is the complete table definition? What is the complete pg_dump command being given? Is the PK definition in the pg_dump file? For plain text format can you grep/find it? For custom format does: pg_restore -s -t show it? How is the dump file being restored? > > When doing a REINDEX the issue is fixed. > > As this seems to me to be some form of index corruption, I tried using > amcheck (bt_index_check and bt_index_parent_check) to verify for > corruption but both resulted with no issues (the index is a btree). > > I would expect the corruption to show up when using amcheck, am I > hitting some kind of bug here? > > Are there any other ways to doublecheck for corruption (without enabling > checksum upfront)? > > This concerns a PostgreSQL version 15 btw. > > Thanks! > > > Disclaimer -- Adrian Klaver adrian.klaver@aklaver.com