Thread

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Use term "referenced" rather than "dependent" in dependency locking

  1. dependencyLockAndCheckObject(): dependent vs referenced

    Kyotaro Horiguchi <horikyota.ntt@gmail.com> — 2026-05-28T02:46:08Z

    Recently, the following error message was added in back branches 14-18:
    
    "dependent %s was concurrently dropped"
    
    As I understand it, this is emitted in
    dependencyLockAndCheckObject(Oid classId, Oid objectId) when the
    object identified by classId/objectId no longer exists at that point.
    
    However, looking at one of the callers:
    
    > void
    > recordMultipleDependencies(const ObjectAddress *depender,
    >                            const ObjectAddress *referenced,
    >                            int nreferenced,
    >                            DependencyType behavior)
    > {
    >     ...
    >     dependencyLockAndCheckObject(referenced->classId,
                                     referenced->objectId);
    
    and further up, the function comment says:
    
    > /*
    >  * Record a dependency between 2 objects via their respective ObjectAddress.
    >  * The first argument is the dependent object, the second the one it
    >  * references.
    >  *
    >  * This simply creates an entry in pg_depend, without any other processing.
    >  */
    > void
    > recordDependencyOn(const ObjectAddress *depender,
    >                    const ObjectAddress *referenced,
    >                    DependencyType behavior)
    > {
    >     recordMultipleDependencies(depender, referenced, 1, behavior);
    > }
    
    Ignoring higher-level callers for the moment, if this comment is
    considered authoritative, then it seems that the object being checked
    here is the referenced object rather than the dependent one.
    
    If so, should the message perhaps say:
    
    "referenced %s was concurrently dropped"
    
    instead?
    
    Perhaps the word "dependent" is intentionally being used in a broader
    or less strict sense here, but even so, it seems preferable for the
    terminology to remain reasonably consistent within this area of the
    code, especially since the dependency logic is already fairly subtle.
    
    Regards.
    
    -- 
    Kyotaro Horiguchi
    NTT Open Source Software Center
    
    
    
    
  2. Re: dependencyLockAndCheckObject(): dependent vs referenced

    Heikki Linnakangas <hlinnaka@iki.fi> — 2026-05-28T18:40:52Z

    On 28/05/2026 05:46, Kyotaro Horiguchi wrote:
    > Recently, the following error message was added in back branches 14-18:
    > 
    > "dependent %s was concurrently dropped"
    > 
    > As I understand it, this is emitted in
    > dependencyLockAndCheckObject(Oid classId, Oid objectId) when the
    > object identified by classId/objectId no longer exists at that point.
    > 
    > However, looking at one of the callers:
    > 
    >> void
    >> recordMultipleDependencies(const ObjectAddress *depender,
    >>                             const ObjectAddress *referenced,
    >>                             int nreferenced,
    >>                             DependencyType behavior)
    >> {
    >>      ...
    >>      dependencyLockAndCheckObject(referenced->classId,
    >                                   referenced->objectId);
    > 
    > and further up, the function comment says:
    > 
    >> /*
    >>   * Record a dependency between 2 objects via their respective ObjectAddress.
    >>   * The first argument is the dependent object, the second the one it
    >>   * references.
    >>   *
    >>   * This simply creates an entry in pg_depend, without any other processing.
    >>   */
    >> void
    >> recordDependencyOn(const ObjectAddress *depender,
    >>                     const ObjectAddress *referenced,
    >>                     DependencyType behavior)
    >> {
    >>      recordMultipleDependencies(depender, referenced, 1, behavior);
    >> }
    > 
    > Ignoring higher-level callers for the moment, if this comment is
    > considered authoritative, then it seems that the object being checked
    > here is the referenced object rather than the dependent one.
    > 
    > If so, should the message perhaps say:
    > 
    > "referenced %s was concurrently dropped"
    > 
    > instead?
    
    Yes, you're right. I mixed up the terminology, in my head "dependent" 
    was a synonym for "referenced", but it's not. "dependent" means the same 
    as "depender", which is a term we use in some other places.
    
    I've changed the error message and comments to say "referenced". Thanks!
    
    - Heikki