Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joLg9-0000rh-Q4 for pgsql-general@arkaria.postgresql.org; Thu, 25 Jun 2020 06:48:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1joLg8-0000C4-O9 for pgsql-general@arkaria.postgresql.org; Thu, 25 Jun 2020 06:48:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joLg8-0000Bw-F5 for pgsql-general@lists.postgresql.org; Thu, 25 Jun 2020 06:48:08 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1joLg6-0007Tp-G0 for pgsql-general@lists.postgresql.org; Thu, 25 Jun 2020 06:48:08 +0000 Received: by mail-lj1-x22e.google.com with SMTP id q19so5257993lji.2 for ; Wed, 24 Jun 2020 23:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=hVeHBmiNrQdi8t6t6LRcBhfiP6VNSvPF3YAAlQrniHc=; b=U+i+h5OrgCaDAOEsig+tZoVeq/50WcYQOxIp/69ixECvh0Z7gVjtWovZPrVeA+pzRt u686jN8kq/a29e/TapJkwQ91ck5xAVVG9gFU40o3mqIP3wvKn14LbOisK6HmYGuP5PO7 xj3/KAcj8P+H+BT4ozyaHEZaZ7fW3NBJOwno+In97o/0osfIzYSi+jwKlaRxwn3mLV7p dZ2BWYehC97QkxMQXR5/FlUAKRqh4bdTXApA/UFvQCqdfZjlcUBGQfuYcKtmfVdkkT30 mJyKzR6c2CKQj+5AzEo0R6v+TafHCKFrnEGwmgaazOk8QCj7bZYec3muqhhQM+oEbxWl JNNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=hVeHBmiNrQdi8t6t6LRcBhfiP6VNSvPF3YAAlQrniHc=; b=QH88YzZDL1CrEbYkOKZ6QMCfWa8eWjOQkyDsInKOG6Xe/mJ/jrajTNdo7rnIg/VLZb +tPQxPUROBC9GuLPBNoQfdGJm7nCnvKH2rzX/uONZX8mFczNz9XbA22FWdx06Jb1Vhp9 hRdJ0LneXlK0qC1LGc2yGF14yTEMdpyk+zYVhuN5iFoTxut/IjOgQhDePDxDOL7Ua5pr hvfOpRaSU4v3nlIXSmUKd8+PDHwqyb7pzl04DpdLJ651q6KQuBI1GwfMURE+0AO9Yda/ AccbyzVt9AffDuf/1pqVZbB47s+yaN8m+Ht4WWE44bLQAAZHNdU2UTf2ip7ObAqCON5g dFFA== X-Gm-Message-State: AOAM531q4e6PuT7/+90ESQr27MORaDtQL0dXCfIIpbB4PNbCH7wJ6bhI sZ0iRw2B2/O5MvI38+Zp3ns= X-Google-Smtp-Source: ABdhPJxOPq+UEw7VcMAGQCm4ASDMTnuLdz6d1vSR8VSUQwAA4x8NpVUFIiXtNCSMEAhFgYpH6qNdKQ== X-Received: by 2002:a2e:2a81:: with SMTP id q123mr3718773ljq.229.1593067685127; Wed, 24 Jun 2020 23:48:05 -0700 (PDT) Received: from [192.168.10.106] (133-225-29-85.dyn.estpak.ee. [85.29.225.133]) by smtp.gmail.com with ESMTPSA id l16sm5747268lfg.2.2020.06.24.23.48.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jun 2020 23:48:04 -0700 (PDT) From: Toomas Kristin Message-Id: <13533C8F-1771-4D33-B0CD-0A366B1E604D@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_0CA45031-8280-49E4-ACA9-34FF98DDA0AC" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: ERROR: canceling statement due to conflict with recovery Date: Thu, 25 Jun 2020 09:48:03 +0300 In-Reply-To: Cc: pgsql-general@lists.postgresql.org To: RAJAMOHAN References: X-Mailer: Apple Mail (2.3608.80.23.2.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_0CA45031-8280-49E4-ACA9-34FF98DDA0AC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, Basically I had the same topic recently and based on observation I would = say that configuration parameter hot_standby_feedback disables no only = some vacuuming operations but something else as well. I played thru the = same scenario where I disabled hot_standby_feedback and and vacuuming, = but still had conflicts on standby node. I am on opinion that the = conflict is not related with the table that has disabled vacuuming the = conflict may be related with any table instead that is used during the = same session/connection. I would suggest to make sure that application/client disconnects from = standby node as soon as possible in order to release all possible = locks/blockers on master that may cause bloating. BR, Toomas > On 24. Jun 2020, at 11:31, RAJAMOHAN wrote: >=20 > Hello all, >=20 > Your expertise is needed on this. I was going through previous mails = regarding the same topic and was able to setup the slave with = hot_standby_feedback enabled. > Queries are running fine with bloat occuring on master. >=20 > I tried the below scenario, where i disabled hot_standby_feedback and = on table level disabled autovacuum for 2 big tables on master. Ran the = query on the slave machine but still conflict error occurs. >=20 > I checked the pg_stat_database_conflicts view, the counter is = increasing for confl_snapshot. Cross-checked with pg_stat_user_tables = view, last time autovacuum happened for the 2 tables was 1 day before. >=20 >=20 > My doubt, even though no autovacuum and no DML activities happening = for both the tables in master. Why is conflict error occuring? >=20 >=20 >=20 > Thanks & Regards, > Rajamohan.J >=20 --Apple-Mail=_0CA45031-8280-49E4-ACA9-34FF98DDA0AC Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Hi,

Basically I had the same topic recently and based on = observation I would say that configuration = parameter hot_standby_feedback disables no only some vacuuming = operations but something else as well. I played thru the same scenario = where I disabled hot_standby_feedback and and vacuuming, but still = had conflicts on standby node. I am on opinion that the conflict is not = related with the table that has disabled vacuuming the conflict may be = related with any table instead that is used during the same = session/connection.

I would suggest to make sure that application/client = disconnects from standby node as soon as possible in order to release = all possible locks/blockers on master that may cause bloating.

BR,
Toomas

On 24. = Jun 2020, at 11:31, RAJAMOHAN <garajamohan@gmail.com> wrote:

Hello all,

Your = expertise is needed on this. I was going through previous mails = regarding the same topic and was able to setup the slave with = hot_standby_feedback  enabled.
Queries are = running fine with bloat occuring on master.

I tried the below scenario, where i = disabled hot_standby_feedback and on table level disabled = autovacuum for 2 big tables on master. Ran the query on the slave = machine but still conflict error occurs.

I checked the pg_stat_database_conflicts view, the counter is = increasing for confl_snapshot.  = Cross-checked with pg_stat_user_tables = view,  last time autovacuum happened for the 2 tables was 1 = day before.


My doubt, even though no autovacuum and = no DML activities happening for both the tables in master. Why is = conflict error occuring?



Thanks & Regards,
Rajamohan.J


= --Apple-Mail=_0CA45031-8280-49E4-ACA9-34FF98DDA0AC--