| From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
|---|---|
| To: | Greg Sabino Mullane <htamfids(at)gmail(dot)com>, Wim Rouquart <wim(dot)rouquart(at)kbc(dot)be> |
| Cc: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Index (primary key) corrupt? |
| Date: | 2026-03-10 15:09:34 |
| Message-ID: | bf9f2217-103f-4737-b3cd-4795032a1242@aklaver.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 3/10/26 7:43 AM, Greg Sabino Mullane wrote:
> On Tue, Mar 10, 2026 at 10:24 AM Wim Rouquart <wim(dot)rouquart(at)kbc(dot)be
> <mailto:wim(dot)rouquart(at)kbc(dot)be>> 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(dot)klaver(at)aklaver(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pierre Forstmann | 2026-03-10 18:53:30 | Re: LISTAGG à la Oracle in PostgreSQL |
| Previous Message | Greg Sabino Mullane | 2026-03-10 14:43:45 | Re: Index (primary key) corrupt? |