Обсуждение: Materialize view in slave server

Поиск
Список
Период
Сортировка

Materialize view in slave server

От
Mahmoud Moharam
Дата:
Hello All ,
hope every thing is well with you all ,
I planned to run stream replication (primary / slave) on my environment , and want to make writes on primary and reads from slave , so the question is :- I have Materialize view running on primary , what is the best choose to run Materialize view on primary or on slave ?

thanks all

Re: Materialize view in slave server

От
Frank Alberto Rodriguez
Дата:
Hello. If you planned to writes over materialized views, you should use  the 
primary server, because the slave must be to read only.
If you want to avoid writes in the slave, use normal views instead, otherwise 
ensure the writes over a materialized view occur in a primary node only, but 
reading it on slave node would not be a problem.

Regards 

On lunes, 1 de abril de 2019 09:02:13 CST Mahmoud Moharam wrote:
> Hello All ,
> hope every thing is well with you all ,
> I planned to run stream replication (primary / slave) on my environment ,
> and want to make writes on primary and reads from slave , so the question
> is :- I have Materialize view running on primary , what is the best choose
> to run Materialize view on primary or on slave ?
> 
> thanks all







Re: Materialize view in slave server

От
Mark Kirkwood
Дата:
If you use logical replication, you can create the materialized view on 
the slave. Which is *better* (master or slave) - depends on whether you 
want to have as many reads as possible coming from the slave, and also 
details like how much lag (i.e how much out of date) your slave is.

regards

Mark

On 2/04/19 4:02 AM, Mahmoud Moharam wrote:
> Hello All ,
> hope every thing is well with you all ,
> I planned to run stream replication (primary / slave) on my 
> environment , and want to make writes on primary and reads from slave 
> , so the question is :- I have Materialize view running on primary , 
> what is the best choose to run Materialize view on primary or on slave ?
>
> thanks all