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 1vzyiL-001V0c-0f for pgsql-general@arkaria.postgresql.org; Tue, 10 Mar 2026 15:09:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vzyiJ-0049m9-24 for pgsql-general@arkaria.postgresql.org; Tue, 10 Mar 2026 15:09:40 +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 1vzyiI-0049lz-2E for pgsql-general@lists.postgresql.org; Tue, 10 Mar 2026 15:09:39 +0000 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vzyiH-00000001Swh-0RfI for pgsql-general@lists.postgresql.org; Tue, 10 Mar 2026 15:09:38 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 1D4267A0105; Tue, 10 Mar 2026 11:09:36 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Tue, 10 Mar 2026 11:09:36 -0400 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=fm3; t=1773155375; x=1773241775; bh=nP6G24UUdDXXbem2w5OhMSYp4+HjdQ7tyy04dewDSB4=; b= QgB8/oxwibXfPbZFJtz8OtwPkXCcKoChZKLcgvCsvw3MRStNkjWSQbk01KFaI1H1 TylXafzr7bS1zldSRGbNJGH/7kNdONSbrFfOUfeA5+rKhOasRFTqIzZ5M+SSQgQL py9hCdvQwTE470XaM65R+y+1k1GQ8txVOVKG3SujBHN3OiZ5jr0AEfHm4Nn0ljW8 848+vf5CHB4PzHIN1f17LJ12sUS3Gr8OHMiNCexireHlV/lTBxUobwQS7OLrvQfM wZJ7voT7er69X+B7sjEa+nWWZL0i7cb8IHY/ODIx7kjjkSWky9qJWta7m1Tenqll ukDGpp2IuowiRKyQEa3fCA== 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=fm1; t=1773155375; x= 1773241775; bh=nP6G24UUdDXXbem2w5OhMSYp4+HjdQ7tyy04dewDSB4=; b=2 fMgXtpnpYYyGviIe8XP8N9C8/8hjXhs+koK7nas9tQxj1gB0wJZvX7M/dZhHYK9j biTbXaPto14Sdf1jRr1ghEIBvdlGMfqsfmIkdWIZuU4b0ZkR5sMWrYWLnc7gFNCB M5AjQqTRCVZzE46Z2T1vcM3imoi+Usd7HhRHDybnJ1QDDm2JnkPm2vPaq8qVkfZU iyFOoMY0YqZR/g+wIDcCVYOgRuj0DyIa09i+Q6IHY9D+jJ0fifi/MnAVc/r7vKCc UAOeLtj5WkythhWnB3mhanBoGuGA+HaVqb0pvZ5exTOQ4iXkFDJicBWSab/Q+3K6 d7WnGYjbwiSQSeUIbQqsA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvkedufeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepgfdufeekhfevfeelveeiueevhedvuddukeduvddvlefh ueeuieejtdeuvdevvdeunecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgr nhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggprhgtphhtthhopeefpdhmoh guvgepshhmthhpohhuthdprhgtphhtthhopehhthgrmhhfihgushesghhmrghilhdrtgho mhdprhgtphhtthhopeifihhmrdhrohhuqhhurghrtheskhgstgdrsggvpdhrtghpthhtoh epphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 10 Mar 2026 11:09:35 -0400 (EDT) Message-ID: Date: Tue, 10 Mar 2026 08:09:34 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Index (primary key) corrupt? To: Greg Sabino Mullane , Wim Rouquart Cc: "pgsql-general@lists.postgresql.org" References: <25b5291f-a3d3-4655-a3d3-57f28b70ec5a@aklaver.com> <78328b08-249e-4251-8a10-b5dac183442a@aklaver.com> <0868c260-9812-4629-b32d-026c1fe6089f@aklaver.com> <7d455186-0cba-4fd5-9f9e-7051627b3ae3@aklaver.com> <2016a784-0644-4932-a0f1-3613c2521c78@aklaver.com> 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 3/10/26 7:43 AM, Greg Sabino Mullane wrote: > On Tue, Mar 10, 2026 at 10:24 AM Wim Rouquart > wrote: > > Let me get this straight, are you still contesting that the index is > actually not part of the dumpfile and I somehow just keep on > ‘missing it’? > > That is one possibility, yes, but there are others. We just don't have > enough data. It would be great to see exactly what pg_dump is doing so > we know where the corruption/disconnect is. If you have access, could > you try: I am convinced that the index definition is not in the pg_dump output. The crux of the matter seems to be from here: https://www.postgresql.org/message-id/78328b08-249e-4251-8a10-b5dac183442a%40aklaver.com "Alright, so the corrupt index is transferred by the binary pg_basebackup, but not in logical backups done via pg_dump/pg_restore. The issue then is on the source database with whatever process is corrupting the index and causing no error to be thrown when the table is dumped." Where the pg_basebackup was done from the production database in order to set up a test database and the logical dumps where done from the test database. Hopefully the below will tease that out. > > psql -c "alter system set log_statement='all' " -c "select pg_reload_conf()" > > pg_dump -t bcf_work_type --schema-only > bcf.debug > > psql -c "alter system reset log_statement" -c "select pg_reload_conf()" > > Then send us bcf.debug as well as the Postgres logs generated during > that request? > > Cheers, > Greg > -- Adrian Klaver adrian.klaver@aklaver.com