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 1mu5lA-0000q6-Av for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Dec 2021 04:37:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mu5l9-0002hW-84 for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Dec 2021 04:37:51 +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 1mu5l8-0002hL-Jp for pgsql-hackers@lists.postgresql.org; Mon, 06 Dec 2021 04:37:50 +0000 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mu5l5-0002j0-Ba for pgsql-hackers@lists.postgresql.org; Mon, 06 Dec 2021 04:37:49 +0000 Received: by mail-pg1-x52c.google.com with SMTP id 137so9311517pgg.3 for ; Sun, 05 Dec 2021 20:37:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cjCCMt7EMlFHuns2dGDOKY8YFtPdXF8+ytyk0S6DjaM=; b=FC6LzFCq6PVDlsN1/3BmeApu+Es7s6vTN6Agl0ahUfuPGYf9MTMYy4oZAf1UM80dl6 qE5T/kzmvzuu+ytOJlRsP9tF2JrU+DbR0WL4UqveAbVuuhkZ/kwRSUzQVmuxV/7/0Oux njPw9doUIeAolchS2LmNbac0jiEvN/8nLo/AHNkOWMvCqNusdP0SjMI7zRtubFrEdxbg F6sxOZ3a3EMUrg7jblPxm0NRigdJlcBWKcFL+V/9XN+HTDZK309+8qX31UzxAcPiS2T0 r8JpasyJQAsytjjlRbf8F86R0hEr/Id5lEFlROTXRcHrveEtPJnGvlFFcL7iRXIqliZZ 2Y3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cjCCMt7EMlFHuns2dGDOKY8YFtPdXF8+ytyk0S6DjaM=; b=afzzvKvtdk9bnRZqQv12nw4sp/XOIfk6H9+eRRCYBA1MWtHHT9ndwwrfFBFq+/EZfJ DRiPTSeSkE7TDNxYKJ9CnBhnF5mMdKy7uD7WFH/2uKYiAkvq1/NK/QbNDav081ctQNO0 cAkcMGkEm+5WpuZAqCXD8S2g1AxfGHNq4E61V6BZorxUVWwYBJAdfGFVYGJ04ig1GepP Kt9dDrjhV3YhEC8wtNZ2FDXofcNfZhGsrf/qEktoNu/wfegcguhkYQBcj+FGj7mlwAjE CFCfNWUDTqIXQShcUZiIXAakbMJEx9SjVklZsAtS9n0ATBJLXkGZl/DkQ1cu3uEiO5NQ knTQ== X-Gm-Message-State: AOAM533vb8YiYpLPLdXiITyuc3rvkOAQrkR6rEakx6WKD+pFu9n1VRzs jSxhO7qbTBNRZnOXM5picZGtI4oUkkhCbgycZ6x4QltPWFLYM8vIN4jNmMcv0jNjZiMs1n8YnEk lhiy7I/gx9C8Oe2bAVTT1Wsop53fDQlnK0DtP2LF2Cj8g1yyH6JeRg7qC5jwmtEBQ9endrBVH6u y8im5Jp78z9qJknyW+Q3tL+fVYqUZeGwL0IOLgEvaugzPU9BJ2RhtV X-Google-Smtp-Source: ABdhPJyg9JlHjcWlRI0YMX4VrxIDLfufDcUm5cL42GyW9RVun3IiwqG7f1rpqEmCskrm36p3QxbQgQ== X-Received: by 2002:a05:6a00:114d:b0:4a2:87bd:37f with SMTP id b13-20020a056a00114d00b004a287bd037fmr34555207pfm.82.1638765466126; Sun, 05 Dec 2021 20:37:46 -0800 (PST) Received: from laptop280-ma-us.hitronhub.home (24-113-193-150.wavecable.com. [24.113.193.150]) by smtp.gmail.com with ESMTPSA id np1sm12231614pjb.22.2021.12.05.20.37.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Dec 2021 20:37:45 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Optionally automatically disable logical replication subscriptions on error From: Mark Dilger In-Reply-To: Date: Sun, 5 Dec 2021 20:37:44 -0800 Cc: "osumi.takamichi@fujitsu.com" , vignesh C , Greg Nancarrow , Masahiko Sawada , "Smith, Peter" , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Amit Kapila X-Mailer: Apple Mail (2.3608.120.23.2.7) X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Dec 1, 2021, at 8:48 PM, Amit Kapila = wrote: >=20 > The patch disables the subscription for non-transient errors. I am not > sure if we can easily make the call to decide whether any particular > error is transient or not. For example, DISK_FULL or OUT_OF_MEMORY > might not rectify itself. Why not just allow to disable the > subscription on any error? And then let the user check the error > either in view or logs and decide whether it would like to enable the > subscription or do something before it (like making space in disk, or > fixing the network). The original idea of the patch, back when I first wrote and proposed it, = was to remove the *absurdity* of retrying a transaction which, in the = absence of human intervention, was guaranteed to simply fail again ad = infinitum. Retrying in the face of resource errors is not *absurd* even = though it might fail again ad infinitum. The reason is that there is at = least a chance that the situation will clear up without human = intervention. > The other problem I see with this transient error stuff is maintaining > the list of error codes that we think are transient. I think we need a > discussion for each of the error_codes we are listing now and whatever > new error_code we add in the future which doesn't seem like a good > idea. A reasonable rule might be: "the subscription will be disabled if the = server can determine that retries cannot possibly succeed without human = intervention." We shouldn't need to categorize all error codes = perfectly, as long as we're conservative. What I propose is similar to = how we determine whether to mark a function leakproof; we don't have to = mark all leakproof functions as such, we just can't mark one as such if = it is not. If we're going to debate the error codes, I think we would start with an = empty list, and add to the list on sufficient analysis. =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company