Re: Update or Delete causes canceling of long running slave queries - Mailing list pgsql-general

From Jeff Janes
Subject Re: Update or Delete causes canceling of long running slave queries
Date
Msg-id CAMkU=1xq3CuMcGNg+ve-3qfjFTzjNwu5z4qYSVSb5mtrDTHZzw@mail.gmail.com
Whole thread Raw
In response to Update or Delete causes canceling of long running slave queries  (Viswanath <M.Viswanath16@gmail.com>)
Responses Re: Update or Delete causes canceling of long running slave queries
List pgsql-general
On Thu, May 12, 2016 at 6:37 AM, Viswanath <M.Viswanath16@gmail.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


pgsql-general by date:

Previous
From: Sameer Kumar
Date:
Subject: Re: Update or Delete causes canceling of long running slave queries
Next
From: db042190
Date:
Subject: downloaded 32 bit pg 9.1 but driver isnt seeing some rows