Noah Misch wrote: > Concerning the problem that started this thread, I would raise one ALTER TABLE > event per table and not fire an event for the bulk request as a whole.
Yes, that's how it already works. Essentially, ALTER TABLESPACE MOVE calls AlterTableInternal, and that function calls one ATExecFoo() for each table to be moved. What my code does is set up "AT event collection" when ALTER TABLESPACE MOVE is called, and then for each ATExecFoo() is executed, one event is added to a queue. When ALTER TABLESPACE MOVE finishes, all those events are reported together. This part is not a problem. The only part that is a problem is that the CommandTag comparison in event_trigger.c wasn't happy that a command was being passed with the ALTER TABLESPACE command tag, because tablespaces are not supported by that module --- and I think the unhappiness was only in an assert-only block (but I'm not 100% sure about that last bit, because I didn't try removing that test.) -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers