pglogrepl icon indicating copy to clipboard operation
pglogrepl copied to clipboard

What's is the new created table message?

Open zhanghaiyang9999 opened this issue 3 years ago • 2 comments

We know the insert a new record, the message type is pglogrepl.InsertMessage.

What's the message type for a new table after creating a new table for the database. When creating the publication with FOR ALL TABLES; can get the inert message even if the table is new created after creating the publication, But I don't know how to capture the event for the creating table. @jackc Would you please help it? thanks!

zhanghaiyang9999 avatar Aug 01 '22 07:08 zhanghaiyang9999

According to protocol there is only one message about table (relation) which describes columns.

Relation
Byte1('R') Identifies the message as a relation message.
...

Relation message is sent before any data of this table is send. But there is no specific notification about table creation.

ubombi avatar Aug 21 '22 22:08 ubombi

Reason is that DDL is only supported in proprietary pglogical3 while OSS pglogical2 which is used in Postrges streams only DML.

ubombi avatar Aug 21 '22 22:08 ubombi