public inbox for [email protected]  
help / color / mirror / Atom feed
From: Heikki Linnakangas <[email protected]>
To: Bertrand Drouvot <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Jeff Davis <[email protected]>
Cc: Roman Eskin <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: Alexander Lakhin <[email protected]>
Cc: [email protected]
Cc: Tom Lane <[email protected]>
Subject: Re: Avoid orphaned objects dependencies, take 3
Date: Wed, 27 May 2026 18:53:35 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <ahYAKgbx05IQdjwR@bdtpg>
References: <CA+TgmobxpkwwjfM4EkZxyKpJ3S0CqQPXPkqQn4YmCHBeMDypdQ@mail.gmail.com>
	<aD2u/GR/[email protected]>
	<CA+TgmoZh8yXoQ2AF-VFSTswhin0o+BZ78AaOsWZskCW1GHBd6g@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<ad/awXLnMuc6Rf5M@bdtpg>
	<afCXPVNuvpf5ECGZ@bdtpg>
	<CA+TgmobtzkG9HzGtDXbgb3KVE46qHuSvGcuKHgAGQ1aejCoLLw@mail.gmail.com>
	<agsCqlLTytZCudMv@bdtpg>
	<[email protected]>
	<ahYAKgbx05IQdjwR@bdtpg>

On 26/05/2026 23:18, Bertrand Drouvot wrote:
> On Tue, May 26, 2026 at 09:00:11PM +0300, Heikki Linnakangas wrote:
>> - Added a test for a dependency on a role too, to cover the existing
>> shdepLockAndCheckObject() function. It's currently disabled because it
>> prints the OID, though.
> 
> Nit: It also adds:
> 
> +# function - role
> +permutation "s1_begin" "s1_alter_function_owner" "s2_drop_role" "s1_commit"
> 
> That is not disabled and would already pass without the changes added in 0001.
> 
> So I wonder if we could just start by adding this new test (and the XXX one) in
> a dedicated patch and then add 0001 that would focus on orphaned stuff only.

True, we could do that. It doesn't really seem to me any better or worse 
than just including it in the same commit though.

> A few comments:
> 
> 1/
> 
> +#include "catalog/index.h"
> 
> That doesn't look needed.
> 
> 2/
> 
> It looks like pgindent "complains" on pg_depend.c for dependencyLockAndCheckObject().

Fixed these, and did some more copy-editing on the comments. With that, 
committed and backpatched. Version 14 needed a little more work to 
backport because it didn't have IsPinnedObject(). And I noticed that 
recordDependencyFor() was being called with InvalidOid on ALTER TABLE 
commands on tables with dropped columns. That was bogus but harmless 
before this patch; I fixed that too.

Thanks!

- Heikki







view thread (50+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Avoid orphaned objects dependencies, take 3
  In-Reply-To: <[email protected]>

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

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