pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Rohit Arora <arora.leo9@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: canceling statement coming in slave instance
Date: Sat, 24 Nov 2018 20:05:18 +0100
Message-ID: <f32941cee8bbe672bfa8ca3840795b6f8e11f24d.camel@cybertec.at> (raw)
In-Reply-To: <CAMUAjH9FaYYJFkY6K5Exnb4ZA8KiPxOCqFCL9-AMTi+24ZYxdA@mail.gmail.com>
References: <CAMUAjH9FaYYJFkY6K5Exnb4ZA8KiPxOCqFCL9-AMTi+24ZYxdA@mail.gmail.com>

Rohit Arora wrote:
> I occasionally encounter below error.
> 
> ERROR:  canceling statement due to conflict with recovery
> DETAIL:  User was holding a relation lock for too long
> 
> While investigating online i came to know that this issue can be handled by below configuration parameters
> 
> "max_standby_archive_delay "
> "max_standby_streaming_delay" 
> 
> I have increased the value of both the parameters as per below.
> 
> Current values:
> "max_standby_archive_delay=30s" ----> was increased it to 300s but we did not get any benefit so we rollback it to original value
> "max_standby_streaming_delay=300s"
> 
> But still i occasionally encounter the mention issue.

You'd have to set max_standby_streaming_delay to -1 to avoid the
error completely.  But bear in mind that it can delay replication
arbitrarily long.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com





view thread (7+ messages)  latest in thread

Message-ID: <f32941cee8bbe672bfa8ca3840795b6f8e11f24d.camel@cybertec.at>
Permalink:  ../f32941cee8bbe672bfa8ca3840795b6f8e11f24d.camel@cybertec.at/
Also on:    postgresql.org/message-id/f32941cee8bbe672bfa8ca3840795b6f8e11f24d.camel@cybertec.at

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, arora.leo9@gmail.com
  Subject: Re: canceling statement coming in slave instance
  In-Reply-To: <f32941cee8bbe672bfa8ca3840795b6f8e11f24d.camel@cybertec.at>

* 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