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 1qHdni-000393-FZ for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jul 2023 05:14:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qHdng-0006ur-TO for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jul 2023 05:14:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qHdng-0006ui-7H for pgsql-hackers@lists.postgresql.org; Fri, 07 Jul 2023 05:14:36 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qHdnb-002Tr3-0Y for pgsql-hackers@postgresql.org; Fri, 07 Jul 2023 05:14:35 +0000 Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3a3c77e0154so1253623b6e.1 for ; Thu, 06 Jul 2023 22:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688706870; x=1691298870; 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=BxBXlVhe1UbumFzvZfDK7BZlyq2nBfBs7Vbc/8RhHU4=; b=lcS3f9pzIVlD32YT1c+pPUYrHX2oEjJdf26bolMjlkOV0IbpzPbYwnTkA55+w2DO7f s5bzPXVCjUXZpHmQrJZby9ClT1TSbVbJWwycZ5DedlNA5b5eRBCh2ThQQ96yZy7PbVcI RJGkUVomOlkVA7KxWL4Lgj1Rtghc8V2B0ahvW6lDI/ei6cvxxn6w3hXrPcbCUOR52t1G 9N+sHYr129xD+e/o4VrCS19XAbp37XaAjEVoXIbVbOy+7JMYXw37gCxwEwe0DYsUfMV9 WolYvLTpSME3DHgIYNI/fUwrbjOvYw7hCTpYeZhiwhoRsk0m1CV/1zfjCcVWrirIy6sA YtJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688706870; x=1691298870; 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=BxBXlVhe1UbumFzvZfDK7BZlyq2nBfBs7Vbc/8RhHU4=; b=GOBUHMeb4bWBhJWNdJMfIg8ZwsjoXfs6V7NA7HbNBkKoQgfy7vQmgGrtfl08X6AAl1 16umZ5pkg6qIGxSfWAtlC6D4V23MhJjvzpYDF0WsnB+dJhuLuEl+OkRdeyvO9MMYmSNv 0Uy5KPWl31KHpVXW/2GD0sHWaKdTbNPN8LtE8/moEomnHtPY741pUZc9utGEsAFRH+OX Uf1rQIa7GX1YCiaqNxqbFKG8Fpi6V+LUf43ct29MklqsOI3XCyr5h/8LgIEAT0PbzfIm agkwLqS8nQNPZ3NfJ6bwdna/dG5agnMIkGB0jTylrxku3WRif74MnBQ3yXqsPDdadFlZ f7zw== X-Gm-Message-State: ABy/qLYokRR/1jhNH9UkkpDtlHmPKoje6enOk7NhvY8VxrIMdd1ADRsi Vivth4OvHDRgJqCUCt1q2O+5FqpSZoU= X-Google-Smtp-Source: APBJJlHwE240VGAqAAvVzidU88BF0x5foW/NfB7F+9HmVzZWM+BK1EqB+5DnVNOOLYMIRQR6HUBz5A== X-Received: by 2002:a05:6808:e8a:b0:396:e3a:9f2f with SMTP id k10-20020a0568080e8a00b003960e3a9f2fmr4294731oil.5.1688706870258; Thu, 06 Jul 2023 22:14:30 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id b15-20020a63714f000000b0052c22778e64sm2065417pgn.66.2023.07.06.22.14.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 22:14:29 -0700 (PDT) Date: Thu, 6 Jul 2023 22:14:27 -0700 From: Nathan Bossart To: Jeff Davis Cc: Tom Lane , Robert Haas , Noah Misch , "pgsql-hackers@postgresql.org" Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations. Message-ID: <20230707051427.GA3853884@nathanxps13> References: <1799839.1686687804@sss.pgh.pa.us> <4df537f5a0d8c0ceac3eec3809d1144880b8e76d.camel@j-davis.com> <578fb4be80247570e6a05924908765a0b345971e.camel@j-davis.com> <43bbc9f7318057f51552d5986830908cb018dadf.camel@j-davis.com> <1659699.1688086436@sss.pgh.pa.us> <20230630050921.GA2640352@nathanxps13> <931c23465c331fc3d53073cdefa53bad464b0469.camel@j-davis.com> <20230706172004.GA3635686@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline In-Reply-To: <20230706172004.GA3635686@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Here is a new version of the patch that I think is ready for commit (except it still needs a catversion bump). The only real difference from v1 is in AdjustUpgrade.pm. From my cross-version pg_upgrade testing, I believe we can remove the other "privilege-set discrepancy" rule as well. Since MAINTAIN will no longer exist in v16, we'll also need the following change applied to v17devel: diff --git a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm index 843f65b448..d435812c06 100644 --- a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm +++ b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm @@ -274,7 +274,7 @@ sub adjust_old_dumpfile $dump = _mash_view_qualifiers($dump); } - if ($old_version >= 14 && $old_version < 16) + if ($old_version >= 14 && $old_version < 17) { # Fix up some privilege-set discrepancies. $dump =~ On Thu, Jul 06, 2023 at 10:20:04AM -0700, Nathan Bossart wrote: > On Thu, Jul 06, 2023 at 12:55:14AM -0700, Jeff Davis wrote: >> Also remember to bump the catversion. Other than that, it looks good to >> me. > > Will do. Since we are only reverting from v16, the REL_16_STABLE catversion will be bumped ahead of the one on master. AFAICT that is okay, but there is also a chance that someone bumps the catversion on master to the same value. I'm not sure if this is problem is worth worrying about, but I thought I'd raise it just in case. I could bump the catversion on master to the following value to help prevent this scenario, but I'm not wild about adding unnecessary catversion bumps. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com --ikeVEW9yuYc//A+q Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v2-0001-Revert-MAINTAIN-privilege-and-pg_maintain-predefi.patch"