Re: BUG #19086: pg_dump --data-only selects and do not uses index definitions for the dumped tables.

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, andrewbille(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19086: pg_dump --data-only selects and do not uses index definitions for the dumped tables.
Date: 2025-10-15 21:38:09
Message-ID: CAApHDvrcM4G0==52jFoAvmxk6ZRjXKq7nkik=fqq6BH=dSJsYA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 16 Oct 2025 at 05:24, Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
> I tried this with ignore_system_indexes = on, too, but it was very slow.

Seems to be due to pg_get_indexdef / pg_get_constraintdef operating on
a cold cat cache. Getting rid of those the rewritten version runs in
1.8 seconds with 100k tables for me.

That invalidates my timings from yesterday as I must have run the
rewritten query once the catcache was populated. Here are updated
results.

ignore_system_indexes = on 1.5k tables:
master: Execution Time: 26167.741 ms
rewritten: Execution Time: 16661.774 ms

ignore_system_indexes = off 1.5k tables:
master: Execution Time: 105.415 ms
rewritten: Execution Time: 97.030 ms

So not as good.

David

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-10-15 21:55:28 Re: BUG #19086: pg_dump --data-only selects and do not uses index definitions for the dumped tables.
Previous Message Masahiko Sawada 2025-10-15 18:35:07 Re: TRAP: failed Assert("outerPlan != NULL") in postgres_fdw.c