Re: Update or Delete causes canceling of long running slave queries

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Viswanath <M(dot)Viswanath16(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Update or Delete causes canceling of long running slave queries
Date: 2016-05-12 17:10:59
Message-ID: CAMkU=1xq3CuMcGNg+ve-3qfjFTzjNwu5z4qYSVSb5mtrDTHZzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, May 12, 2016 at 6:37 AM, Viswanath <M(dot)Viswanath16(at)gmail(dot)com> wrote:

> Hi,
> I have the following configurations.
>
> On master:
> autovacuum=off
> vacuum_defer_cleanup_age=0
>
> On slave:
> hot_standby_feedback = off
> max_standby_streaming_delay = 30s
>
> Now when I try to run a long query on slave and do some update or delete on
> the table on master I am getting the following error.
>
> ERROR: canceling statement due to conflict with recovery
> DETAIL: User query might have needed to see row versions that must be
> removed.
>
> The error code was : 40001
>
> I am not running vacuum manually and autovacuum is 'off'

I hope you doing that for experimental purposes only.

> What could possibly causing the conflict?

Probably pruning of HOT update chains.

Try turning hot_standby_feedback on, or setting
vacuum_defer_cleanup_age to something more than zero.

Cheers,

Jeff

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message db042190 2016-05-12 17:39:32 downloaded 32 bit pg 9.1 but driver isnt seeing some rows
Previous Message Sameer Kumar 2016-05-12 16:54:24 Re: Update or Delete causes canceling of long running slave queries