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.