Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pbmo6-0001Yc-6h for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Mar 2023 18:22:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pbmo4-0002TB-2k for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Mar 2023 18:22:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pbmo3-0002T2-Nd for pgsql-hackers@lists.postgresql.org; Mon, 13 Mar 2023 18:21:59 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pbmnw-0001xd-Jz for pgsql-hackers@lists.postgresql.org; Mon, 13 Mar 2023 18:21:59 +0000 Received: by mail-pl1-x62b.google.com with SMTP id a2so13961710plm.4 for ; Mon, 13 Mar 2023 11:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678731710; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hwOwyKsXTluSTJ2lpQLHvce4gtoaagO5m2sTmWTR+9Y=; b=PYQL4L9BTX2+n0kCTVFrUdcjkbG0Bb4JAdic3dYd6i681DZ5S7LmTxFzM+jbk2etnC nJyUa6GWVECmzRbAJTeW5rCazao7FsPzXucPBvMUDG9+cFUG0ywMbIayi+aHEpI82BEs pEA7dQbfqxSsl/bJdIWX8TWWJzncj8x2JAR+w7bHBN8JS3ZTMCraXbA1XIDOWnuyqCa7 C7K3yvaUimqcJBJuU7SgVzsZXtRPpW68CzguXDku3G2tkE7UvrHiVEN2Mi0wog1t5HBW 2fbgeOE1ElNmcYswg7mytCnN1tnNF18ELBdpf3wuOnhKcnI0TM1hEGM/zIlPZwfZG9Vl 3VVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678731710; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hwOwyKsXTluSTJ2lpQLHvce4gtoaagO5m2sTmWTR+9Y=; b=2YR/IGbzFlU0Gpi4hAS7flyL0KEa3ImSxn//lFHsiJnKgODVmTfKtEPG2F3BKM0s/w BXrsY3OnKyaap4wyAto3PR8JGd335FbVhEr5f1eihueAkICiamjdSI83vg5yyoNKB/8a v0CHG9aZIizREpwt2BBlxUkjTm48RDaeJt6E5wrW3ifntG1na0EzT3pfZYWO143hTbhi 6a8cu5tjMugMFH5dTMsl0dzvy7jF8kkdiFNYcOl+ZhacPgBtjWLDo0pTWat9fRvllZ9D Ox54xFYSsDAFb3GaVs7ms2ctrdoUiA089zhVgXO5xKiGmKXKvzfjamp8zY0fZxbYR7B7 ZiRA== X-Gm-Message-State: AO0yUKU+sI/cu/niJPRqquk8aPrh8v8jX962sJHGq/Kn+KlZ5x9BG3Mw tForNUWCZR+iskSiyaNAKro= X-Google-Smtp-Source: AK7set9U0Xor+eEgfTEUgFqNARlvjZLKrtRTcrBnCcZePG7fjw7KIm2lT0yJJsYPuT8jMfTTXKyNnA== X-Received: by 2002:a17:902:d492:b0:19d:abd:bb7e with SMTP id c18-20020a170902d49200b0019d0abdbb7emr43358928plg.34.1678731710291; Mon, 13 Mar 2023 11:21:50 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id l15-20020a170902f68f00b0019f363ed8c0sm167191plg.226.2023.03.13.11.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 11:21:49 -0700 (PDT) Date: Mon, 13 Mar 2023 11:21:47 -0700 From: Nathan Bossart To: Daniel Gustafsson Cc: PostgreSQL Hackers Subject: Re: Reducing connection overhead in pg_upgrade compat check phase Message-ID: <20230313182147.GA294021@nathanxps13> References: <20230218054613.GA3360104@nathanxps13> <542946CF-0D77-446E-9FA6-028982175320@yesql.se> <20230222192006.GA79448@nathanxps13> <235E7E38-6DCA-4E5F-812C-7F3033FC800A@yesql.se> <89A64E5D-D3DC-4806-B038-CD493F5F5510@yesql.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <89A64E5D-D3DC-4806-B038-CD493F5F5510@yesql.se> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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