Lag in asynchronous replication
hi,
in case of automated failover i want to check if slave ia lagging from
master and only if it is in sync, i want to do failover. But I am working
in a virtual cloud environment so by that time the master VM may not be
available to me. How can i check the lag in that case ?
Regards,
SUBHANKAR CHATTOPADHYAY
Import Notes
Reply to msg id not found: CAPg1NnER9JMzZYXbwMz6z1Wj8TtSHBuA0kYGWZvcWH34KcGJbQ@mail.gmail.comReference msg id not found: CAPg1NnHT+cP6zE2BuJ-Jaes6h=wgT+feYSzs-nDTQ1oWcVAcwg@mail.gmail.comReference msg id not found: CAPg1NnGvny_6RPfKE2r+KcEnFk_3qVBQHHt5ennhRUgVLWiB7A@mail.gmail.comReference msg id not found: CAPg1NnFPTOm6oE5nxrG8ne=tOe6y3O1k3vemhcY1oNUPNiqANA@mail.gmail.comReference msg id not found: CAPg1NnF+jEEGJFnApJBH_mxdj8SH+saQapD7UOihS33FCp5Mmw@mail.gmail.comReference msg id not found: CAPg1NnGWHT1DoOLU3=g3GTM1oAe3yu=Jcvk6teMX6fpNSsp3zg@mail.gmail.comReference msg id not found: CAPg1NnGER0B35YEi=QZhskQwUUhhJy+S+184Zzh0W8oqtUveXw@mail.gmail.comReference msg id not found: CAPg1NnER9JMzZYXbwMz6z1Wj8TtSHBuA0kYGWZvcWH34KcGJbQ@mail.gmail.com
On Thu, Mar 23, 2017 at 11:37 PM, Subhankar Chattopadhyay
<subho.atg@gmail.com> wrote:
in case of automated failover i want to check if slave is lagging from
master and only if it is in sync, i want to do failover. But I am working in
a virtual cloud environment so by that time the master VM may not be
available to me. How can i check the lag in that case ?
Is your environment switching dynamically to async if the lag is too
important? If not, once you have reached a sync state, the master
would wait for all transactions commits to complete on the slave, so
once the client has received a commit confirmation you have the
guarantee that the data is already flushed on the slave. In this case
you don't need to know what happens on the master.
--
Michael
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hi Michael,
Are you asking to have slave with synchronous replication?
Regards,
SUBHANKAR CHATTOPADHYAY
On 24 Mar 2017 09:33, "Michael Paquier" <michael.paquier@gmail.com> wrote:
Show quoted text
On Thu, Mar 23, 2017 at 11:37 PM, Subhankar Chattopadhyay
<subho.atg@gmail.com> wrote:in case of automated failover i want to check if slave is lagging from
master and only if it is in sync, i want to do failover. But I amworking in
a virtual cloud environment so by that time the master VM may not be
available to me. How can i check the lag in that case ?Is your environment switching dynamically to async if the lag is too
important? If not, once you have reached a sync state, the master
would wait for all transactions commits to complete on the slave, so
once the client has received a commit confirmation you have the
guarantee that the data is already flushed on the slave. In this case
you don't need to know what happens on the master.
--
Michael
On Fri, Mar 24, 2017 at 3:11 PM, Subhankar Chattopadhyay
<subho.atg@gmail.com> wrote:
Are you asking to have slave with synchronous replication?
(top-posting is annoying)
No, slaves cannot do synchronous replication. I am just telling that
once you are sure that a sync state has been achieved on the master,
you have the guarantee that data gets synchronously replicated on the
standbys as long as you do *not* change synchronous_standby_names. So
there is no actual need to know what's the state of the master during
a failover to a sync standby.
--
Michael
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general