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 1jm1Al-00050N-PT for pgsql-general@arkaria.postgresql.org; Thu, 18 Jun 2020 20:30:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jm1Ak-0003Ta-6Q for pgsql-general@arkaria.postgresql.org; Thu, 18 Jun 2020 20:30:06 +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 1jm1Aj-0003TT-SA for pgsql-general@lists.postgresql.org; Thu, 18 Jun 2020 20:30:05 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jm1Ah-0003Ka-Po for pgsql-general@postgresql.org; Thu, 18 Jun 2020 20:30:05 +0000 Received: by mail-lj1-x22a.google.com with SMTP id i3so8903070ljg.3 for ; Thu, 18 Jun 2020 13:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=Z2GEROYsNL91FdX/RNgJoOCg5BJ3tZGyl4UcqN8SK3I=; b=bnLdP+xHg3j8RBE4EHja0TKtg4eQXUbdOKgF0RMhJCMTn5dWHOvY1s5MgnCFuMgc6Z LofkrJkONHAwI1hm7SxqPFEzcDhhCN6cUDtHBdUfLSdahBxP5L5jvCF+EzyjbVCbi7U9 ONiwB3G/CQWk+FUhLQb95F/LfCn0BggXCjZmNB9AeSEwF7cR+nyMSTnbYLlGp0hLp8q/ imE3BQbOjlByJA+LYNghpnU+VGInv3mAvce5vBHqPh44Wp1+k9uPBakls69jnvWZDK0P 5o60ctMFlTaFDbX0YhRQhjZjBGZSdLMQDPoWYYJMTj3pfUS6ePv4aeN6E9edKc6WRR39 R2wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=Z2GEROYsNL91FdX/RNgJoOCg5BJ3tZGyl4UcqN8SK3I=; b=Fjn9jubYBjVQfBc4c+8rpEc5XtF3i4K7q++82lIrKnxm+uTvhiLv7B2j0yuK4PXn8x gZb9+pAaZ7oyvZc3ozr9uMw1MUCsME4lpmOTQg/hCgojFQ5exf6nYkC0W9wGeYJCWVYE wFkWXihe/9Mbu+XceLfIeXwzso3JF0VmKdXQRrHLDoGctrpzkmfP3WBUbpktX+dMtHnr g17SZOsafMCmvDxsMfIrj/jKvZ/uaQOA2Brc0ZGb/vFWqFOl7CTCKJZlqtphU6b3mSDE EshS3ouzZE52gMjUb2DVM5JdJCRS5LWZXjG4/DFned6XuKXXxuEEku+qQg7CzM4iHn6h 2KcQ== X-Gm-Message-State: AOAM530FHQp8VW5zHP1lUavCLbXm+U06cKmUt9DB+MctfK8ne7E4mr/J yXzygOnkmEEV2AzSi75abFgr+8vV X-Google-Smtp-Source: ABdhPJzK+ysN7utII5z9Na1SyhqKW2WxZ7zHPFPlgcWlnYRiglbmAp8SvL5+h+fiUm6GDDB5k3/aTg== X-Received: by 2002:a2e:a0ca:: with SMTP id f10mr97609ljm.96.1592512202398; Thu, 18 Jun 2020 13:30:02 -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 g12sm822570ljl.33.2020.06.18.13.29.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2020 13:29:55 -0700 (PDT) From: Toomas Kristin Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Conflict with recovery on PG version 11.6 Date: Thu, 18 Jun 2020 23:29:49 +0300 References: <5726DC60-FA11-494F-AC0C-D418DDCC895F@gmail.com> <70b0df32cce4bcb0e5909854e270458714e187f2.camel@cybertec.at> <918BFA04-B89D-4F29-9868-0A113AD72F52@gmail.com> <2d05bf2ad62fc71a5df3d9ba4e75fa300e3e020c.camel@cybertec.at> To: Laurenz Albe , pgsql-general In-Reply-To: <2d05bf2ad62fc71a5df3d9ba4e75fa300e3e020c.camel@cybertec.at> Message-Id: X-Mailer: Apple Mail (2.3608.80.23.2.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, > There can be other reasons: >=20 > - replicated ACCESS EXCLUSIVE locks that conflict with queries > - replicated ACCESS EXCLUSIVE locks that cause deadlocks > - buffer pins that are needed for replication but held by a query > - dropped tablespaces that hold temporary files on the standby Thank you for ideas what to verify. > I told you the remedies above, why don't you like them? Basically I want to achieve situation where replication is not suspended = (lag is not more than 3 minutes) and statements on standby are not = terminated. Based on collected information I don=E2=80=99t see any = connection between vacuuming on master and termination of statements on = standby. I can temporarily disable vacuuming in order to be 100% sure = this is the case. And when I set max_standby_streaming_delay either -1 = or as a very big number then it helps avoid query termination but = doesn=E2=80=99t help me about suspended replication. All worked with = same configuration on Postgres version 10.6, the issue started after = version upgrade. This is the reason why I am very keen to find out real cause for the = conflict. BR, Toomas