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.96) (envelope-from ) id 1vqvjS-003PxX-0G for pgsql-general@arkaria.postgresql.org; Fri, 13 Feb 2026 16:09:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vqvjR-00F8dQ-0J for pgsql-general@arkaria.postgresql.org; Fri, 13 Feb 2026 16:09:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vqvjQ-00F8dI-25 for pgsql-general@lists.postgresql.org; Fri, 13 Feb 2026 16:09:25 +0000 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vqvjO-00000000T7n-3QYl for pgsql-general@lists.postgresql.org; Fri, 13 Feb 2026 16:09:24 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 0F8C0EC009E; Fri, 13 Feb 2026 11:09:23 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Fri, 13 Feb 2026 11:09:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc: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=fm2; t=1770998963; x=1771085363; bh=nGiipeXYitiuHbdq0JrNB+/HryjTC06o4z09tKcPUM4=; b= lpdK03C4sR53+8IjIbF7/V7w1IVwHYt7R56rrtEHLEwqO/sLCTQQOjoQYiEmQRwe LdzLt2kejWGnZdpDL5K92Po82EwzcD7f/l+w4B+ayZGJ8MXjCxxcLnizBBN0az+B THy8WUMhxtJtMgpVxeOnoIPdIFW11IbNoebDkCmCadTRP0oXbPIQVIMjdHBit/zT ls9AuGsfQtgx9B8Mbx9TJyyQme5wCkcPsUrOxWNoaspT0WYvYVBKulOxDj24tl0U rRu2uHlPXLS6dpFdiWVUKunqGoopqc3IOl7gncrpfHKBerlUBPBBEpqlG5aQXtQZ ZNWL2KAHqp7ij+L26UT+Zg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm3; t=1770998963; x= 1771085363; bh=nGiipeXYitiuHbdq0JrNB+/HryjTC06o4z09tKcPUM4=; b=v IJj8jm3cUHcZwKiAO8rbdq+ePNY+NUVyKyxjbxEhOcqzOXDHkxfjIwi6ROfLzXrs 09Dq4B7lRk3toiHmnt7KJpA0EVMB7qmasJ0ygCjAvNckwt6MmGaDjMa9Ce6x1X9f y+tRUhZPuMqjxPcFc93oTCIq5yIn/Aoe5q5jg//Fb4VRtqKaj30o1mArSVk0ImgG SBD/OAggrEuNUbm6Nwx+ZhaNTBQ2OPkiAHkHgkxBuA/mhVwmMEHR0p63fMVH0rID jmBYwQvIZhmVAxx+mXFn5iTij/0XxpsY0uIfZfIy2PKW1OY47sh2X1FpYBz2uwse +JH7C0lBrUk5JunKylIpg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvtdekieelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepuedufeejjefggfdttdeghefgkeeuveekkeeiteettdek ffehiedvtefhveffgeeunecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgr nhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggprhgtphhtthhopeefpdhmoh guvgepshhmthhpohhuthdprhgtphhtthhopeifihhmrdhrohhuqhhurghrtheskhgstgdr sggvpdhrtghpthhtohephhhtrghmfhhiughssehgmhgrihhlrdgtohhmpdhrtghpthhtoh epphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 13 Feb 2026 11:09:22 -0500 (EST) Message-ID: Date: Fri, 13 Feb 2026 08:09:21 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Index (primary key) corrupt? To: Wim Rouquart , Greg Sabino Mullane Cc: "pgsql-general@lists.postgresql.org" References: <5043ff13-2f39-4a80-a8f8-6765746b6a89@aklaver.com> <58221272-d684-4799-a113-d5a5031a0b05@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/13/26 00:08, Wim Rouquart wrote: > Internal > > Ok, to do a small recap because indeed this thread has been extended for a while now. > > - The issue with the specific index was noted on a production database (after a datarefresh that partly failed because of the missing index). > > - To reproduce and experiment with the issue, a pg_basebackup was taken from that prod instance and restored to a test instance. Every single test step is executed on this test instance, the prod database is no longer involved, pg_basebackup is no longer involved, everything is pg_dump based from here on onwards. > > - So this means the test pg_dumps where done with the index in a 'non-fuctional state'. As expected, the create statement of the index does NOT show up in the generated .sql scripts (neither 'loose' nor in the create statement of the table). 1) It won't be included with the CREATE TABLE statement per:- https://www.postgresql.org/docs/current/app-pgdump.html "--section=sectionname Only dump the named section. The section name can be pre-data, data, or post-data. This option can be specified more than once to select multiple sections. The default is to dump all sections. The data section contains actual table data, large-object contents, sequence values, and statistics for tables, materialized views, and foreign tables. Post-data items include definitions of indexes, triggers, rules, statistics for indexes, and constraints other than validated check and not-null constraints. Pre-data items include all other data definition items. " 2) The issue seems to be not the dump, but the non-functional state of the index on the source database. Is there any indication of why that is happening? Also what error do you get on the source database that tells you the PK is not working? > > I hope this clears out any confusion. > > -----Original Message----- Adrian Klaver adrian.klaver@aklaver.com