public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bertrand Drouvot <[email protected]>
To: Jeff Davis <[email protected]>
Cc: Heikki Linnakangas <[email protected]>
Cc: Robert Haas <[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: Thu, 25 Jun 2026 11:10:58 +0000
Message-ID: <aj0MwjV1RKV8FvCG@bdtpg> (raw)
In-Reply-To: <ajVD9TjerBLteNlx@bdtpg>
References: <aie26jMSoEMrHLaI@bdtpg>
<[email protected]>
<ailZCCmS0bGlNBfe@bdtpg>
<ail/6I6mcitovsUo@bdtpg>
<[email protected]>
<ajEg7PrJYWnmB6zk@bdtpg>
<[email protected]>
<ajI0Tz9dIJvLGHNY@bdtpg>
<[email protected]>
<ajVD9TjerBLteNlx@bdtpg>
Hi,
On Fri, Jun 19, 2026 at 01:28:21PM +0000, Bertrand Drouvot wrote:
> Hi,
>
> On Thu, Jun 18, 2026 at 04:21:33PM -0700, Jeff Davis wrote:
>
> > We could keep the transaction ID in the tracking record, and ignore
> > entries from an aborted subxact. But it's getting fairly complex and
> > delicate.
As discussed off-list, let's move forward with this proposal (as the save a copy
of the object's ACL + ROLE membership mentioned in [1] would be more complex and
fragile).
So PFA the new version doing so. It's the same patch series as the previous one
except that it adds:
0004: Discard ACL tracking entries from aborted subtransactions
It stores SubTransactionId in each AclCheckEntry at recording time.
On subtransaction abort, AtEOSubXact_AclTrack() discards entries whose subxid
is >= the aborting subtransaction's ID.
The code is pretty simple but I suspect that adding a test would probably need to
create a brand new module (say test_acltrack) with C code forcing
recordDependencyOn() and BeginInternalSubTransaction()) and I'm not sure it's
worth it. Indeed, I think the test would need to do things similar to what you
shared in [2].
The patch is split to ease the review but should probably be merged as a single
patch.
[1]: https://postgr.es/m/ajVF7YWf%2Bpxs4cOf%40bdtpg
[2]: https://postgr.es/m/[email protected]
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
view thread (50+ messages)
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: <aj0MwjV1RKV8FvCG@bdtpg>
* 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