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 1kdd1D-0005b2-Fk for pgsql-general@arkaria.postgresql.org; Fri, 13 Nov 2020 17:37:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kdd1C-000167-EB for pgsql-general@arkaria.postgresql.org; Fri, 13 Nov 2020 17:37:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdd1C-000160-3K for pgsql-general@lists.postgresql.org; Fri, 13 Nov 2020 17:37:50 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kdd18-0003cx-Hc for pgsql-general@postgresql.org; Fri, 13 Nov 2020 17:37:49 +0000 Received: by mail-ed1-x536.google.com with SMTP id l5so11609384edq.11 for ; Fri, 13 Nov 2020 09:37:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=bLcmSTdOWIg8ASVLYFWQEHem713HmxN8L6trcNSHt5w=; b=UgT2hXEPEsWnlNBSQl3ACndpgfrJI51e9lw3SRZD7tJzMz/HUUBAR019lTcq7o0Esk 0sBGImwD/xt6RKbVrGF1H4QMbEs8JcQCglsOZCJfJTi3R5mxub5Yt7RuBEKdpi4bwT8R /3gKnoERhVxMLKML52YB+DDLFni+S80++l/Bdh0FAXgQZKxRAXNYOS/bLG86Qf1uGl1x 5WxOzsTfCwbvDCeBOsV1QIpN9EOVLz1Bh5xiPaycBa9C5hq2PXGORIJwanDUBqhWEB6N MW8P4MkgR4yGL8m26T61X/nMlBW2Y2qoXIBZq2s80UehZFSQK2/vCw8A+R+M8VflJ+lG n+oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=bLcmSTdOWIg8ASVLYFWQEHem713HmxN8L6trcNSHt5w=; b=kX68I4W2AW6EOhbbj1RSyT9AYtx8qB8fVhnrmdazWlxPsBZ6hXIRHTo3Ze8ioUOfk3 mXDiY9eL2gF1goxWkXcpztfQmQU7vEwu98xY8Vgiva39xIZ2OEV1qnuQGuEI+lPuE4mv /r0L3z3+dPHP7OAh72rcKmJhr2tYJMDl+/kt6A1xqq2ul40KqsWKrQiotdw5kjlE2040 QVwwuXpY8govget23nCN0pk0iqpb0UUK7lWwcDIkqfU6jCJS8SJja7ArSsNPPvE524oF EIVZD8s2SGm8vCSHcvuTDVVsLpbq3H0bVs8HWL9GwqFlPfraEfyRFDDQEqSTtJm/pdWM 5fvw== X-Gm-Message-State: AOAM530//NRpQgMug+tdzhXEuZ2h8P8e5a2vOU8etbiZK5aeHzvds/h8 Ur6+rlAyJStr4RzmfbO0WjSncGwuxZzvCw== X-Google-Smtp-Source: ABdhPJykkHY41OZI6frxzhavQAG3XJzLi+9EFCnale7nWWGacKCfibAsAFVQXiNNXJjMNQv3yv04Pw== X-Received: by 2002:a50:ee97:: with SMTP id f23mr3784874edr.333.1605289060969; Fri, 13 Nov 2020 09:37:40 -0800 (PST) Received: from localhost.localdomain (217-149-172-233.nat.highway.telekom.at. [217.149.172.233]) by smtp.gmail.com with ESMTPSA id mj12sm474470ejb.117.2020.11.13.09.37.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 09:37:40 -0800 (PST) Message-ID: Subject: Re: conflict with recovery when delay is gone From: Laurenz Albe To: Radoslav Nedyalkov , pgsql-general Date: Fri, 13 Nov 2020 18:37:36 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, 2020-11-13 at 15:24 +0200, Radoslav Nedyalkov wrote: > On a very busy master-standby setup which runs typical olap processing - > long living , massive writes statements, we're getting on the standby: > > ERROR: canceling statement due to conflict with recovery > FATAL: terminating connection due to conflict with recovery > > The weird thing is that cancellations happen usually after standby has experienced > some huge delay(2h), still not at the allowed maximum(3h). Even recently run statements > got cancelled when the delay is already at zero. > > Sometimes the situation got relaxed after an hour or so. > Restarting the server instantly helps. > > It is pg11.8, centos7, hugepages, shared_buffers 196G from 748G. > > What phenomenon could we be facing? Hard to say. Perhaps an unusual kind of replication conflict? What is in "pg_stat_database_conflicts" on the standby server? Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com