public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Greg Sabino Mullane <[email protected]>
To: Wim Rouquart <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Index (primary key) corrupt?
Date: Tue, 10 Mar 2026 08:09:34 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKAnmmKwGsCtCeQ2GvDVhp9ZTjSsoZBrfe1Yw_UfcHD1u=StUw@mail.gmail.com>
References: <AS2PR05MB1075477BA334D4DA262AD75BFEF16A@AS2PR05MB10754.eurprd05.prod.outlook.com>
	<[email protected]>
	<AS2PR05MB107546C1B04FC4B3CCF32E60CEF7DA@AS2PR05MB10754.eurprd05.prod.outlook.com>
	<[email protected]>
	<DB5PR05MB107646FFE78759D1D5431F802EF7AA@DB5PR05MB10764.eurprd05.prod.outlook.com>
	<[email protected]>
	<AS2PR05MB1075476F648651C8CC02D8048EF79A@AS2PR05MB10754.eurprd05.prod.outlook.com>
	<CAKAnmmLsxdt51sp-w0JxMi0haGXHFKD2pXURfOSOa5iVzjni4w@mail.gmail.com>
	<[email protected]>
	<CAKAnmmJzw9TeOd=_VtJ430_AhS+asfRLuOg=mgL0yT_K+7X-yQ@mail.gmail.com>
	<[email protected]>
	<CAKAnmmJogm0T4vF5nvhzK=GbfAcPhsLtKR_yRn-neMQP7S2_YQ@mail.gmail.com>
	<AS2PR05MB10754848BE9C45CEF4F881D5AEF46A@AS2PR05MB10754.eurprd05.prod.outlook.com>
	<CAKAnmmKwGsCtCeQ2GvDVhp9ZTjSsoZBrfe1Yw_UfcHD1u=StUw@mail.gmail.com>

On 3/10/26 7:43 AM, Greg Sabino Mullane wrote:
> On Tue, Mar 10, 2026 at 10:24 AM Wim Rouquart <[email protected] 
> <mailto:[email protected]>> 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
[email protected]






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Index (primary key) corrupt?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox