Detecting schema changes during logical replication

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Detecting schema changes during logical replication
Date: 2017-05-07 18:27:08
Message-ID: CA+mi_8bgGnveMAFyuM=rV+XVDZeG1-27gEi_Uavu5xMqXnaeNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

I'm putting together a replication system based on logical
replication. I would like to send table information only the first
time a table is seen by the 'change_cb' callback, but of course there
could be some schema change after replication started. So I wonder: is
there any information I can find in the 'Relation' structure of the
change callback, which may suggest that there could have been a change
in the table schema, hence a new schema should be sent to the client?

Thank you very much,

-- Daniele

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-05-07 19:04:32 Re: Detecting schema changes during logical replication
Previous Message Mat Arye 2017-05-07 17:04:12 Question about toasting code