I'm trying to utilze Postgres 10 logical replication mechanism by reading replication messages in Go code. Most of the logical replication messages refer to something called "Relation Id".
My question is: how to get Relation Ids for all of the existing tables? I am aware of "Relation" message type, but I don't know how to trigger them.
While using logical replication publisher sends Relation
messages before sending the data, which contain all information necessary to decode incoming messages. Thus reading database schema beforehand would be not the right way of getting RelationID
.
This was the documentation page I was missing.