Skip to content

Expose *format.Relation type of messages #16

@Abdulsametileri

Description

@Abdulsametileri

Relation messages contains schema information. Basically, relation messages says "The changes I sent you now (INSERT, UPDATE, DELETE) belong to the table with this name, this OID (Object Identifier) and these columns".

This message is not sent after every (INSERT, UPDATE, DELETE) operation. If, table has a first time operation or any relation definition change, protocol sends this.

For example Update message, in the protocol level

If table has a first update,
B -> begin byte
R -> relation byte
U -> update byte
C -> commit byte

same table has a second update
B -> begin byte
U -> update byte
C -> commit byte.

more info: https://www.postgresql.org/docs/current/protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW

We already handle these messages in go-pq-cdc but we not exposed here. We can easily achieve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions