Hi, Table AM has a callback for assigning a new file locator to the table (and, accordingly, creating its own storage). That is, as far as I understand, the design implies that the creator of the access method has the right to fully dispose of the table storage. However, for example, there is an "ALTER COLUMN ... TYPE ..." command, inside which two storage swaps occur (the source table and the temporary one). Wouldn't it be better to have a separate callback for such an operation? I am writing my own access method, and for each table I store some information in the local memory of the process. In this case, the information is "linked" to the oid of the table. At this time, ALTER creates a temporary table, fills it with data, and then deletes it. And I have no way of knowing that the storage of this table (which I should be able to manage myself) now belongs to another table (with the exception of POST_ALTER object access hook, but it looks more like a hack).
-- Best regards, Daniil Davydov