Re: Hot standby read slaves exceed max delay on WAL segment. Replication lag.

From: Venkata Balaji Nagothi <vbnpgc(at)gmail(dot)com>
To: Shaun Duncan <shaun(dot)duncan(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Hot standby read slaves exceed max delay on WAL segment. Replication lag.
Date: 2014-03-21 01:21:24
Message-ID: CAHBAh5vjDcPsjrJM5NUO4CeouZ-bmQ-6ZkHB8SAM8MPJPUjj4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> Yes, we do see statements being canceled from time to time, just not when
> we experience a lag situation with WALs not being applied. Is it just
> entirely possible that there is too much work for one of the slaves to do
> (hence the degraded query throughput we see) that it is unable to apply
> WALs? In other words, there are no conflicts that occur, but WALs cannot be
> applied an a timely manner? There's a noticeable pattern that in times of
> lag, the overall number of slow queries dramatically increases (i.e. from a
> few hundred to tens of thousands).
>

1. If SQL statements are getting cancelled time-to-time - then
max_standby_*_delay parameters are working as expected and there is no
issue with them.

2. You need to look at the lag issue, which can occur for number of other
reasons.

How do you come to a conclusion that there is a lag between master and
slave ? Did you check the last xlog position on master and slave databases ?

Lag occurs even when the load is very high. Do you see any high IO wait on
Master or Slave ?

I did not understand when you said "from few hundred to tens of thousands"
- These are number of WALs or SQLs you are referring to ?

Do you see any other messages related to lag in Standby logfile (like " WAL
archive file not found.. cannot be restored..." etc)

Same is the situation across all the slaves ?

Venkata Balaji N

Sr. Database Administrator
Fujitsu Australia

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Granthana Biswas 2014-03-21 05:20:37 Re: Dead rows not getting removed during vacuum
Previous Message Haribabu Kommi 2014-03-20 23:40:38 Re: Dead rows not getting removed during vacuum