Repository navigation
Refuse to track object_reference's own extension members - #44
Conversation
`object__getsert()` (via `_object_v__for_update()`) now raises feature_not_supported for any object belonging to the object_reference extension. Letting the tracking machinery observe its own members means the extension's own DDL -- including its update scripts restructuring the extension -- becomes something that machinery reacts to. `_object_reference._is_own_object()` checks `pg_depend` membership (`deptype = 'e'`), plus the two objects that are never 'e' members: the extension's declared schema and its own `pg_extension` row. `_etg_capture` also skips objects in the object_reference, _object_reference and __object_reference schemas: an object created by the extension's own install/update script isn't recorded as an 'e' member until the surrounding CREATE/ALTER EXTENSION finishes, so `_is_own_object()` can't see it yet when ddl_command_end fires. The 0.1.0 -> stable update script creates `_is_own_object()` and the updated `_etg_capture` inside its existing session_replication_role section. Part of #40
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
Claude finished @jnasbyupgrade's task in 16s —— View job Code review of PR #44I read the diff and found no blocking bugs. I did not run the test suite or CI. Minor / non-blocking
Looks good
|
_etg_capture is back to its prior definition: nothing in this PR can reach the exclusion clauses. Reword the _is_own_object comments and drop the "predating this PR" remark in test/sql/base.sql. build.out line numbers follow the removed lines. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Claude finished @jnasbyupgrade's task in 13s —— View job Code review of PR #44I read the diff against Issue: the PR description doesn't match the diff
Minor / non-blocking
Looks good
|
|
Written by Claude. Replies to the items in the two github-actions reviews (first: #44 (comment), second: #44 (comment)).
No change.
No longer apply. Commit 8233c1f removed this PR's "the PR description doesn't match the diff" (second review, "Issue") Fixed; the description has been updated to match the diff. "If Not in this PR's scope:
No change. An update script has to carry full replacements for the functions it changes, and, as the review notes, this matches the existing |
Questioned automated-review findings: #44 (comment)
object__getsert()(via_object_v__for_update()) now refuses, withfeature_not_supported, to track any object that belongs to the object_reference extension itself. The extension's own members must never become tracked objects.Part of #40. #45, stacked on this PR, completes #40.
Details
_object_reference._is_own_object(classid, objid)checkspg_dependmembership (deptype = 'e'against object_reference's own extension row), plus the two objects that are neveremembers: the extension's declared schema (the extension depends on it, not the other way around) and its ownpg_extensionrow.sql/object_reference--0.1.0--stable.sqlcreates_is_own_object()inside its existingsession_replication_role = replicasection, and adds the same guard to its copy of_object_v__for_update().test/sql/base.sqlgains five tests: tracking_object_reference.object,_object_reference._etg_drop, theobject_referenceschema and the_object_referenceschema are each rejected, and_is_own_object()recognizes the extension's ownpg_extensionrow._object_v__for_update()'s description now points callers that only need an existing record at_object_reference._object_v.