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 235E7E38-6DCA-4E5F-812C-7F3033FC800A@yesql.se
Whole thread Raw
In response to Re: Reducing connection overhead in pg_upgrade compat check phase  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Reducing connection overhead in pg_upgrade compat check phase
List pgsql-hackers
> On 22 Feb 2023, at 20:20, Nathan Bossart <nathandbossart@gmail.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




pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Raising the SCRAM iteration count
Next
From: Matthias van de Meent
Date:
Subject: Re: PATCH: Using BRIN indexes for sorted output