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 1pIr0Y-0005cl-Pb for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jan 2023 13:00:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pIr0W-0002Gr-JZ for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jan 2023 13:00:36 +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 1pIo7k-0006CM-8Z for pgsql-hackers@lists.postgresql.org; Fri, 20 Jan 2023 09:55:52 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pIo7i-0008Im-AP for pgsql-hackers@lists.postgresql.org; Fri, 20 Jan 2023 09:55:51 +0000 Received: by mail-ej1-x629.google.com with SMTP id rl14so9245813ejb.2 for ; Fri, 20 Jan 2023 01:55:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=BHobgp1ohDPG5NCL7yeZj1nc7J6JtwnukVzscXHYLrw=; b=uEjDFefb2TakNZx0V0y3WUsmf5SJqBfGpf1VwdTMfGxgx6pGPfoBTvUwiZdEv4sbvc u0qT968/MmctW4AY0Uki27MXOzwrX2vsX02+sKGzvCA6lDhJhe492yb3lwhJUVUKl1Wo coPwYRPNengiwcJRAWMxUWW6dMUG9z/GPif/xjBCx6ZwYtPtx6PBOFe9uYpIuSl4JCqH rwL3z4pCuFVdty+FBKpdVg13tRlEz05TkQRAq66mUKjHfPDZ/muz4JalZY25YRbOH5nt +Wi9MgN1JpAKEmFyBgxy1lzeXiOB+uRzWyunTym1w12FglLMG5+etaIEPnmu6IoYTjS2 PANw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BHobgp1ohDPG5NCL7yeZj1nc7J6JtwnukVzscXHYLrw=; b=y3wQqk25WEAeXBIg2DDBIMUlnFI/e78bHNyfC8xypirgYZghfd5UYPSNfZZQopYXlb QMvqykUBHF6AAIPkH4im9NZhstvdEjGZ6No8o3NbM2Wja98AM6wqbglonqEnswAeyqzl BErdfYb31w7YdX19bfUdTe2AVcojmdqRJXPVLbDMTa7oWW1G7UQnwEyUPFUUKHgo1Kzf gpHtA6zrzt3gOFzNcp98bKeS3yoGgiWRA1xaRQUUkFWg6fe/9XN9vR0hKtYmaCBUuywA 4NF/cF+ZYagnQVz2Y5Adiy+1fHAtIS7DELbVZ22TiOpYhXxlbjbxfE2EflZ6hzuuat7k 467Q== X-Gm-Message-State: AFqh2kole/1YKY34/RpxKErbMW3yR4+ivLMZCJPF6MfkvUYKgU944sWZ wbXIONjyiiCbUecSCOA349vILg== X-Google-Smtp-Source: AMrXdXtmaPbpO4pVeK2zTJsUZqXuce9oIE1TmO6WxhNIG50eqG7xPIrUhlbMMNvC09h/HJfiSQ0GBg== X-Received: by 2002:a17:906:4d0a:b0:84d:3e38:2f0c with SMTP id r10-20020a1709064d0a00b0084d3e382f0cmr28505218eju.67.1674208549241; Fri, 20 Jan 2023 01:55:49 -0800 (PST) Received: from dynamic-pd01.res.v6.highway.a1.net ([2001:871:5e:539:1b2c:c52a:475d:310c]) by smtp.gmail.com with ESMTPSA id l3-20020a17090615c300b008566b807d8asm13629235ejd.73.2023.01.20.01.55.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 01:55:48 -0800 (PST) Message-ID: <93e483c3c8688029295a972bb701f41af9fac877.camel@cybertec.at> Subject: Re: ***Conflict with recovery error*** From: Laurenz Albe To: Abhishek Prakash , "pgsql-general@lists.postgresql.org" , "pgsql-hackers@lists.postgresql.org" , "usergroups@postgresql.org" Date: Fri, 20 Jan 2023 10:55:48 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 (3.46.3-1.fc37) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2023-01-20 at 08:56 +0000, Abhishek Prakash wrote: > We are facing below issue with read replica we did work arounds by settin= g > hot_standby_feedback, max_standby_streaming_delay and max_standby_archive= _delay, > which indeed caused adverse effects on primary DB and storage. As our DB = is > nearly 6 TB which runs as AWS Postgres RDS.=20 > =C2=A0 > Even the below error occurs on tables where vacuum is disabled and no DML > operations are permitted. Will there be any chances to see row versions > being changed even if vacuum is disabled. > Please advise. > =C2=A0 > 2023-01-13 07:20:12 UTC:10.64.103.75(61096):ubpreplica@ubprdb01:[17707]:E= RROR:=C2=A0 canceling statement due to conflict with recovery > 2023-01-13 07:20:12 UTC:10.64.103.75(61096):ubpreplica@ubprdb01:[17707]:D= ETAIL:=C2=A0 User query might have needed to see row versions that must be = removed. It could be HOT chain pruning or an anti-wraparound autovacuum (which runs even if autovacuum is disabled). Disabling autovacuum is not a smart idea to begin with. Your best bet is to set "max_standby_streaming_delay =3D -1". More reading: https://www.cybertec-postgresql.com/en/streaming-replication-conflicts-in-p= ostgresql/ Yours, Laurenz Albe