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

From Nathan Bossart
Subject Re: Reducing connection overhead in pg_upgrade compat check phase
Date
Msg-id 20230313182147.GA294021@nathanxps13
Whole thread Raw
In response to Re: Reducing connection overhead in pg_upgrade compat check phase  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: Reducing connection overhead in pg_upgrade compat check phase
List pgsql-hackers
On Mon, Mar 13, 2023 at 03:10:58PM +0100, Daniel Gustafsson wrote:
> The attached v3 is a rebase to handle conflicts and with the above comments
> adressed.

Thanks for the new version of the patch.

I noticed that git-am complained when I applied the patch:

    Applying: pg_upgrade: run all data type checks per connection
    .git/rebase-apply/patch:1023: new blank line at EOF.
    +
    warning: 1 line adds whitespace errors.

+                for (int rowno = 0; rowno < ntups; rowno++)
+                {
+                    found = true;

It looks like "found" is set unconditionally a few lines above, so I think
this is redundant.

Also, I think it would be worth breaking check_for_data_types_usage() into
a few separate functions (or doing some other similar refactoring) to
improve readability.  At this point, the function is quite lengthy, and I
count 6 levels of indentation at some lines.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Lock mode in ExecMergeMatched()
Next
From: "Regina Obe"
Date:
Subject: RE: [PATCH] Support % wildcard in extension upgrade filenames