Re: Reducing connection overhead in pg_upgrade compat check phase - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Reducing connection overhead in pg_upgrade compat check phase
Date
Msg-id C655DAE6-B9D5-4244-925B-2CD5ECBFA2D9@yesql.se
Whole thread Raw
In response to Re: Reducing connection overhead in pg_upgrade compat check phase  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Reducing connection overhead in pg_upgrade compat check phase
List pgsql-hackers
> On 8 Feb 2024, at 11:55, Peter Eisentraut <peter@eisentraut.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.

Fixed.

> Idea for further improvement: Might be nice if the DataTypesUsageVersionCheck struct also included the applicable
versioninformation, 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

pgsql-hackers by date:

Previous
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: 2024-02-08 release announcement draft
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: speed up a logical replica setup