pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Federico Campoli <federico@brandwatch.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #8192: On very large tables the concurrent update with vacuum lag the hot_standby replica
Date: Tue, 4 Jun 2013 15:14:07 +0200
Message-ID: <20130604131407.GB2854@alap2.anarazel.de> (raw)
In-Reply-To: <51ADE456.90400@brandwatch.com>
References: <E1Ui5wj-0007tI-Cl@wrigleys.postgresql.org>
	<CAMkU=1x2zB2c8w=+nwQqXUBE0KvpYdJJ1iPYtD5ko12aP029Yw@mail.gmail.com>
	<51ADE456.90400@brandwatch.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2013-06-04 13:57:58 +0100, Federico Campoli wrote:
> On 02/06/13 01:17, Jeff Janes wrote:
> >On Thursday, May 30, 2013, wrote:
> >
> >    The following bug has been logged on the website:
> >
> >    Bug reference:      8192
> >    Logged by:          Federico Campoli
> >    Email address: federico@brandwatch.com <javascript:;>
> >    PostgreSQL version: 9.2.4
> >    Operating system:   Debian 6.0
> >    Description:
> >
> >    /*
> >
> >    Description:
> >
> >    It seems on very large tables the concurrent update with vacuum (or
> >    autovacuum),
> >    when the slave is in hot standby mode, generates long loops in read on a
> >    single wal segment during the recovery process.
> >
> >    This have two nasty effects.
> >    A massive read IO peak and the replay lag increasing as the recovery
> >    process
> >    hangs for long periods on a pointless loop.
> >
> >
> >Are you observing a loop, and if so how are you observing it?  What is
> >it that is looping?
> 
> I'm sorry, just guessing it could be a loop.
> The read remains stuck on the same segment.

Well, if you check the output in that file you can see that 'apply' is
progressing, so it's not stuck in some specific area.
Is the startup process cpu bound during that time? If so, any chance to
get a profile?

> In warm standby everything is fine no lag at all.
> 
> At moment as workaround I've switched to warm standby the slaves as, despite
> the low wal generation on the master ~200Mb/minute the slave accumulates a
> massive lag when the autovacuum processes starts with hot standby (the peak
> was 400 GB and was still increasing before switching to warm standby).

By switching to a warm standby you mean disabling hot_standby=on in the
standbys or changing wal_level?

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (12+ messages)  latest in thread

Message-ID: <20130604131407.GB2854@alap2.anarazel.de>
Permalink:  ../20130604131407.GB2854@alap2.anarazel.de/
Also on:    postgresql.org/message-id/20130604131407.GB2854@alap2.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@2ndquadrant.com, federico@brandwatch.com, jeff.janes@gmail.com
  Subject: Re: BUG #8192: On very large tables the concurrent update with vacuum lag the hot_standby replica
  In-Reply-To: <20130604131407.GB2854@alap2.anarazel.de>
  References: <E1Ui5wj-0007tI-Cl@wrigleys.postgresql.org> <CAMkU=1x2zB2c8w=+nwQqXUBE0KvpYdJJ1iPYtD5ko12aP029Yw@mail.gmail.com> <51ADE456.90400@brandwatch.com> <20130604131407.GB2854@alap2.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox