public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Wim Rouquart <[email protected]>
To: Greg Sabino Mullane <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Index (primary key) corrupt?
Date: Fri, 13 Feb 2026 08:09:21 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <AS2PR05MB1075432E74AF2FA975B02519AEF61A@AS2PR05MB10754.eurprd05.prod.outlook.com>
References: <AS2PR05MB1075477BA334D4DA262AD75BFEF16A@AS2PR05MB10754.eurprd05.prod.outlook.com>
	<[email protected]>
	<AS2PR05MB10754A51AB7FC85161189FF7CEF11A@AS2PR05MB10754.eurprd05.prod.outlook.com>
	<CAKAnmmLNaQ9NnjP=-kMj4t6wjt3+5nmMbQc2+F2Ekv_=zJWs5w@mail.gmail.com>
	<AS2PR05MB10754BFE319E2594C9E076EE2EFFDA@AS2PR05MB10754.eurprd05.prod.outlook.com>
	<[email protected]>
	<AS2PR05MB107549DDE42DC0B8E31CB52BFEF90A@AS2PR05MB10754.eurprd05.prod.outlook.com>
	<[email protected]>
	<AS2PR05MB10754EE81F34146EE8972713EEF91A@AS2PR05MB10754.eurprd05.prod.outlook.com>
	<[email protected]>
	<AS2PR05MB107541E760AECB8639BB968B5EF63A@AS2PR05MB10754.eurprd05.prod.outlook.com>
	<[email protected]>
	<AS2PR05MB1075432E74AF2FA975B02519AEF61A@AS2PR05MB10754.eurprd05.prod.outlook.com>

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
[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