Skip to content

ext_dml_init_hook and ext_dml_finish_hook should be Table AM-level callbacks, not global hooks #1372

@robertmu

Description

@robertmu

These hooks are intended to allow custom Table Access Methods (AMs) to manage resources during DML operations. The ext_dml_init_hook and ext_dml_finish_hook in src/include/access/tableam.h are currently implemented as global hooks.

This design is flawed because if multiple table access methods are loaded, they will overwrite each other's hooks. For example, a DML operation on a pax table could incorrectly trigger a hook that was set by a different, custom table iceberg AM. This will lead to incorrect behavior and instability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions