Re: Reducing connection overhead in pg_upgrade compat check phase

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Reducing connection overhead in pg_upgrade compat check phase
Date: 2023-02-23 14:12:21
Message-ID: 235E7E38-6DCA-4E5F-812C-7F3033FC800A@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 22 Feb 2023, at 20:20, Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:

> One thing I noticed is that the
> "failed check" log is only printed once, even if multiple data type checks
> failed. I believe this is because this message uses PG_STATUS. If I
> change it to PG_REPORT, all of the "failed check" messages appear. TBH I'm
> not sure we need this message at all since a more detailed explanation will
> be printed afterwards. If we do keep it around, I think it should be
> indented so that it looks more like this:
>
> Checking for data type usage checking all databases
> failed check: incompatible aclitem data type in user tables
> failed check: reg* data types in user tables

Thats a good point, that's better. I think it makes sense to keep it around.

>> One change this brings is that check.c contains version specific checks in the
>> struct. Previously these were mostly contained in version.c (some, like the
>> 9.4 jsonb check was in check.c) which maintained some level of separation.
>> Splitting the array init is of course one option but it also seems a tad messy.
>> Not sure what's best, but for now I've documented it in the array comment at
>> least.
>
> Hm. We could move check_for_aclitem_data_type_usage() and
> check_for_jsonb_9_4_usage() to version.c since those are only used for
> determining whether the check applies now. Otherwise, IMO things are in
> roughly the right place. I don't think it's necessary to split the array.

Will do, thanks.

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2023-02-23 14:19:16 Re: PATCH: Using BRIN indexes for sorted output
Previous Message Daniel Gustafsson 2023-02-23 14:10:05 Re: Raising the SCRAM iteration count