public inbox for [email protected]
help / color / mirror / Atom feedFrom: Jeff Davis <[email protected]>
To: Bertrand Drouvot <[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: Mon, 15 Jun 2026 18:19:19 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <ail/6I6mcitovsUo@bdtpg>
References: <[email protected]>
<ahYAKgbx05IQdjwR@bdtpg>
<[email protected]>
<ah1PIyqtT+427dWb@bdtpg>
<[email protected]>
<aiLKkTC6QBt8i35P@bdtpg>
<[email protected]>
<aie26jMSoEMrHLaI@bdtpg>
<[email protected]>
<ailZCCmS0bGlNBfe@bdtpg>
<ail/6I6mcitovsUo@bdtpg>
On Wed, 2026-06-10 at 15:16 +0000, Bertrand Drouvot wrote:
> PFA a new version of v26, it adds a new test as compared to the v26
> previously
> shared.
I'd like to avoid adding lines to AbortTransaction(). Also, I think it
might miss subtransaction aborts, which could be relevant in complex
cases with SPI.
Can you use a structure like:
ProcessUtility()
{
TrackAclTable *prevTrackAclTable = CurrentTrackAclTable;
/* allocates in CurrentMemoryContext */
CurrentTrackAclTable = NewTrackAclTable();
PG_TRY();
{
... rest of ProcessUtility ...
}
PG_FINALLY();
{
FreeTrackAclTable(CurrentTrackAclTable);
CurrentTrackAclTable = prevTrackAclTable;
}
PG_END_TRY();
}
That would avoid the need to create a special memory context; you could
just repalloc() the chunk allocated for the table. It would also mean
you don't have to track the stack frames manually with a counter, just
use a local variable.
Also, are you sure that the two call sites for aclcheck_track_record()
are enough? Or do we need checks in e.g. pg_attribute_aclcheck() as
well?
Regards,
Jeff Davis
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