Re: Avoid orphaned objects dependencies, take 3
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Robert Haas <robertmhaas@gmail.com>, Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Alexander Lakhin <exclusion@gmail.com>, pgsql-hackers@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2025-05-19T17:02:52Z
Lists: pgsql-hackers
On Wed, 2024-05-22 at 10:48 -0400, Robert Haas wrote: > > Then, Tom proposed another approach in [2] which is that "creation > > DDL will have > > to take a lock on each referenced object that'd conflict with a > > lock taken by DROP". > > This is the one the current patch is trying to implement. > > It's a clever idea, but I'm not sure that I like it. I'm not sure if you intended it this way, but using "clever" here suggests that it's an unusual trick. But isn't that the kind of thing heavyweight locks are for? > > My concern was really more about the maintainability of > the code. I fear that if we add code that takes heavyweight locks in > surprising places, we might later find the behavior difficult to > reason about. FWIW, a lock while recording a dependency would not be surprising to me. Assuming that heavyweight locks are the right approach, the locks need to be taken somewhere. And expecting all the callers to get it right seems error-prone. This is a long thread so I must be missing some problem or complication here. 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