Re: Avoid orphaned objects dependencies, take 3
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, Robert Haas
<robertmhaas@gmail.com>, Roman Eskin <r.eskin@arenadata.io>, Michael
Paquier <michael@paquier.xyz>, Alexander Lakhin <exclusion@gmail.com>,
pgsql-hackers@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2026-06-09T21:44:10Z
Lists: pgsql-hackers
Hi, On Tue, 2026-06-09 at 06:47 +0000, Bertrand Drouvot wrote: > In order to be on the safe side of things, the attached now iterates > through all > matching entries (and not only the last one). I don't think: if (context == PROCESS_UTILITY_TOPLEVEL) is quite right. With SPI, I bet you can end up in a situation where the branch fires twice (causing an early reset) or not at all (because the only call is PROCESS_UTLITY_QUERY). In any case, I don't think mixing the tracking entries between entirely different DDL commands is a good idea. If you execute DDL inside of SPI in its own subtransaction, and it inserts a tracking entry to recheck something, and then you roll back the subxact, you don't want the tracking entry to then cause the outer transaction to fail. I didn't test this, so if there's something preventing this kind of problem, let me know. We probably need to track where we are in the stack of ProcessUtility() calls and keep the tracking entries separate, and always remove entries from that level on return (or rollback). Regards, Jeff Davis
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Avoid orphaned objects dependencies
- 2fbb21170e90 19 (unreleased) landed
- 5100bdbd3ba2 14 (unreleased) landed
- 5fa137727db0 15 (unreleased) landed
- d9bc0d96c247 16 (unreleased) landed
- 3a9909eda207 17 (unreleased) landed
- c8cd3d6976f7 18 (unreleased) landed
-
Don't try to record dependency on a dropped column's datatype
- fd93ee100830 19 (unreleased) landed
- 36b6ed2606e1 14 (unreleased) landed
- ef3d7b15e4cd 15 (unreleased) landed
- d44cd467471c 16 (unreleased) landed
- c1588f92a915 17 (unreleased) landed
- f9d5a52da4ca 18 (unreleased) landed