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

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: shihao zhong <zhong950419(at)gmail(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, 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-12-01 04:27:34
Message-ID: CAApHDvpt6pUhB2E=94QB4fH4PqrOY_i3XZ4sj8+XkJ4pVhoVdg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 1 Dec 2026 at 14:54, shihao zhong <zhong950419(at)gmail(dot)com> wrote:
> I found one case where v2 fails
> and master works. It is an old cluster with
>
> standard_conforming_strings = off

> Maybe the regexp_replace() part could be this, with no backslash?
>
> regexp_replace(relnamespace::regnamespace::text, '^"|"$', '', 'g')

Thanks. The attached fixes using that.

David

Attachment Content-Type Size
v3-0001-Speed-up-pg_upgrade-get_rel_infos_query-processin.patch text/plain 9.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message shveta malik 2026-12-01 04:25:10 Re: Preserve conflict log table during upgrade