Re: Reducing connection overhead in pg_upgrade compat check phase

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Reducing connection overhead in pg_upgrade compat check phase
Date: 2024-02-08 14:16:07
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> On 8 Feb 2024, at 11:55, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:

> A few more quick comments:

Thanks for reviewing!

> I think the .report_text assignments also need a gettext_noop(), like the .status assignments.

Done in the attached.

> The type DataTypesUsageChecks is only used in check.c, so doesn't need to be in pg_upgrade.h.


> Idea for further improvement: Might be nice if the DataTypesUsageVersionCheck struct also included the applicable version information, so the additional checks in version.c would no longer be necessary.

I tried various variants of this when writing it, but since the checks aren't
just checking version but also include catalog version checks it became messy.
One option could perhaps be to include a version number for <= comparison, and
if set to zero a function pointer to a version check function must be provided?
That would handle the simple cases in a single place without messy logic, and
leave the more convoluted checks with a special case function.

Daniel Gustafsson

Attachment Content-Type Size
v12-0001-pg_upgrade-run-all-data-type-checks-per-connecti.patch application/octet-stream 41.6 KB
unknown_filename text/plain 1 byte

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2024-02-08 14:22:21 RE: speed up a logical replica setup
Previous Message Ilia Evdokimov 2024-02-08 14:02:52 Re: pg_stat_advisor extension