Re: pg_upgrade's get_rel_infos_query() query can sometimes be slow

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_upgrade's get_rel_infos_query() query can sometimes be slow
Date: 2026-11-27 10:29:24
Message-ID: 9B58347F-C630-472E-B30D-409251318AE5@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 27 Nov 2026, at 10:59, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:

> It seems bonkers to optimize for the case that the stats are bad like that, reltuples=1 and relpages=1 is a completely unrealistic case.

That wasn't the proposal though was it? Or did I misunderstand the below:

> ..david2.sql is faster under normal circumstances, but david1.sql is not
> far behind. When I manually adjust reltuples and relpages to 1, david1.sql
> performs much better than everything else.

The proposal was to use the query in david2.sql.

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-11-27 10:34:22 Re: Set 1s WaitLatch timeout if standby limit has expired in ResolveRecoveryConflictWithBufferPin
Previous Message Heikki Linnakangas 2026-11-27 09:59:48 Re: pg_upgrade's get_rel_infos_query() query can sometimes be slow