Re: BUG #8192: On very large tables the concurrent update with vacuum lag the hot_standby replica

From: Federico Campoli <federico(at)brandwatch(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #8192: On very large tables the concurrent update with vacuum lag the hot_standby replica
Date: 2013-06-04 15:20:12
Message-ID: 51AE05AC.8020907@brandwatch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 04/06/13 14:14, Andres Freund wrote:
> 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(at)brandwatch(dot)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?

Please find attached the profile file and the postgresql log generated
in the test run on my sandbox.

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

The master's wal_level is hot_standby.

I set the warm standby on the slave changing to off the hot_standby
parameter.

Cheers
Federico

--
Federico Campoli
Database Administrator brandwatch.com

Attachment Content-Type Size
profile_log.tar.gz application/x-gzip 208.0 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2013-06-04 15:29:19 Re: BUG #8192: On very large tables the concurrent update with vacuum lag the hot_standby replica
Previous Message Joshua Berry 2013-06-04 14:46:39 Re: Segmentation Fault in Postgres server when using psqlODBC