Replication & web apps

Поиск
Список
Период
Сортировка
От Leonardo Francalanci
Тема Replication & web apps
Дата
Msg-id 44193EFE.3020200@CommProve.com
обсуждение исходный текст
Ответы Re: Replication & web apps
Список pgsql-general
Hi,

I still don't understand how replication can be used in web applications.
Given this scenario:

1) user updates his profile -> update to the db (master)
2) web app redirects to the "profile page" -> select from db (slave)

Since (2) is a select it is issued to the slave.

How can one be sure that the master propagates the update (1) to the
slave before data is requested from the slave (2)?
And: suppose there is a method to understand that the user made a change
to the db in the web request (as above) so that we have to issue all
queries of the same web request to the master, that is:

1) user updates his profile -> update to the db (master)
2) web app redirects to the "profile page" -> select from db (master
again because in this web-request user made a change to the db)

what if the user ask AGAIN for the "profile page" BEFORE write
propagates to the slave:

3) User ask for a refresh of the "profile page" -> select -> slave
(because user didn't make any change during THIS web request)

???

In other words: how can asynchronous replication be used in an
application???








В списке pgsql-general по дате отправления:

Предыдущее
От: "jia ding"
Дата:
Сообщение: Re: \copy combine with SELECT
Следующее
От: Jeff Amiel
Дата:
Сообщение: Re: Replication & web apps