0

https://www.postgresql.org/docs/10/logical-replication-restrictions.html States: "When the schema is changed on the publisher and replicated data starts arriving at the subscriber but does not fit into the table schema, replication will error until the schema is updated"

How do we detect/query for these errors on Postgres?

I tried

SELECT * FROM pg_stat_subscription;

but it shows that it received the publisher's message. It errored out when I changed publisher's schema and subcriber stopped getting updates.

on AWS, the RDS cloudwatch metrics related to it is:

OldestReplicationSlotLag (The lagging size of the replica lagging the most in terms of WAL data received. Applies to PostgreSQL)

but I don't think this is the right metric if I want to know if my updates have corrected applied to the subscriber replica database.

asked Sep 8, 2019 at 21:01

1 Answer 1

0

Through trial and error I found out that you can use OldestReplicationSlotLag.

If there are replication errors, it accumlates the slotlag bytes

answered Sep 8, 2019 at 22:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.