pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations.
Date: Thu, 6 Jul 2023 22:14:27 -0700
Message-ID: <20230707051427.GA3853884@nathanxps13> (raw)
In-Reply-To: <20230706172004.GA3635686@nathanxps13>
References: <1799839.1686687804@sss.pgh.pa.us>
	<4df537f5a0d8c0ceac3eec3809d1144880b8e76d.camel@j-davis.com>
	<CA+TgmoYtJU0KknWr11W--wK=4eJtdHOgupyT=beZVPC8P=o+YA@mail.gmail.com>
	<578fb4be80247570e6a05924908765a0b345971e.camel@j-davis.com>
	<CA+TgmoZVCHERUkXhAMT2Er-sKBc5C6_iX+TpxxivBevDHzq2TQ@mail.gmail.com>
	<43bbc9f7318057f51552d5986830908cb018dadf.camel@j-davis.com>
	<1659699.1688086436@sss.pgh.pa.us>
	<20230630050921.GA2640352@nathanxps13>
	<931c23465c331fc3d53073cdefa53bad464b0469.camel@j-davis.com>
	<20230706172004.GA3635686@nathanxps13>

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

Attachments:

  v2-0001-Revert-MAINTAIN-privilege-and-pg_maintain-predefi.patch (text/x-diff, 0B) download

view thread (59+ messages)  latest in thread

Message-ID: <20230707051427.GA3853884@nathanxps13>
Permalink:  ../20230707051427.GA3853884@nathanxps13/
Also on:    postgresql.org/message-id/20230707051427.GA3853884@nathanxps13

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: nathandbossart@gmail.com, pgsql@j-davis.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, noah@leadboat.com, pgsql-hackers@postgresql.org
  Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations.
  In-Reply-To: <20230707051427.GA3853884@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox