Logical Replication - Type messages? - Mailing list pgsql-general

From Stefen Hillman
Subject Logical Replication - Type messages?
Date
Msg-id CAPgW8pMknK5pup6=T4a_UG=Cz80Rgp=KONqJmTdHfaZb0RvnFg@mail.gmail.com
Whole thread Raw
Responses Re: Logical Replication - Type messages?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hello psql-general,


I have an application which processes logical replication output from a PostgreSQL server. We create publications and read data from a replication slot with the pgoutput plugin.

Postgres has various message formats for logical replication, as defined here: https://www.postgresql.org/docs/10/protocol-logicalrep-message-formats.html

Currently, I process Relation messages to get most of the information I need to work with Inserts, Updates, and Deletes. However, for type information I'm currently using a SQL query to get the column type information. I wanted to use the Type messages, but I never see them. I see Begin, Commit, etc. but never Type.

  • When are the Type messages generated and sent by the server?
  • Is there a way to cause them to be generated?
  • Are these type id > type mappings set in stone, or does PostgreSQL allow for a server to have custom types (I notice that namespace is one of the properties sent with the types)?

Any help is greatly appreciated - thank you!


Best regards,


Stefen Hillman

pgsql-general by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: Question: Is it possible to get the new xlog position after query execution?
Next
From: Oleg Serov
Date:
Subject: Re: Question: Is it possible to get the new xlog position after query execution?