> > > All three commands are captured by the event trigger. The first and > second command ends up getting deparsed, WAL-logged and > replayed on the subscriber. The replay of the ALTER TABLE command > causes a duplicate constraint error. The problem is that > while subcommands are captured by event triggers by default, they > don't need to be deparsed and WAL-logged for DDL replication. > To do that we can pass the isCompleteQuery variable in > ProcessUtilitySlow to EventTriggerCollectSimpleCommand() and > EventTriggerAlterTableEnd() and make this information available in > CollectedCommand so that any subcommands can be skipped. >
May not be able to skip any subcommands. like ' ALTER TABLE ctlt1_like ALTER COLUMN b SET STORAGE EXTERNAL;' It cannot be represented in the CREATE TABLE statement. Regards, Adger