3

I got three servers with postgresql, one is the main db, other two is replication of the main server. I got 5 sql files with droping and recreating materialized views on the main server. My question is how will cope those replication servers? Do i need to restart them to accept changes, or they automatically refresh its data? What commands should i use to solve my problems?

1 Answer 1

4

The standby servers are physical copies of the primary, so they will eventually contain the same data as the primary. There is no special action required.

The only consideration is that creating a materialized view can produce a lot of transaction log (WAL) if the materialized view is large, and this may cause replication to lag for a while if the network connection isn't fast.

Sign up to request clarification or add additional context in comments.

2 Comments

can this be avoided? is this about the number of updates happening, or the cumulative size of them?
@ikari Refreshing a materialized view is a single change - it is about the total size. But in practice, it shouldn't be a problem.

Your Answer

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.