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 1lvCRd-0007Wg-4q for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Jun 2021 05:26:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lvCRc-00088w-3f for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Jun 2021 05:26:00 +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 1lvCRb-00088o-SL for pgsql-hackers@lists.postgresql.org; Mon, 21 Jun 2021 05:25:59 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lvCRV-0005d3-6L for pgsql-hackers@lists.postgresql.org; Mon, 21 Jun 2021 05:25:58 +0000 Received: by mail-pf1-x42d.google.com with SMTP id g6so12755756pfq.1 for ; Sun, 20 Jun 2021 22:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zw+zSP9z2WkQldOvSyXQrEtry/rOG2d1RGg8Bhra6kU=; b=ZruWaJA2iZwGiN/93S1fqpbjsGvOabdGTRoUBHBcDBvrrqQm3d6Q8C1gPl8kk3zYFC dg7++mIdBXmPmLJpLiWZlTI5upFSV/uwi8JBOBAJW/OFGdZTYthnqBwCxQ4iOJaoblWC hIFLu4r5wpSxJ2GfHHJ74bi2thCERRnnHrxg+JiFxzimzOsE3+Vy6TsvYaXq8gyY76IN gc/0a769wgwjhxmaND1JT+KOfqpIPyhQ95F87aPp63HyceTKsntbQ9TEnVmy7tMNvCGN qszEvpYaGd120qyyxovf/5Fa1VanjCy4crgeHKjUYZDVjRs7nhqfChChgrp6NDt3fJw2 J5Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zw+zSP9z2WkQldOvSyXQrEtry/rOG2d1RGg8Bhra6kU=; b=ZCMiTJhzn83JAzUW+kxCW2OmSCR6ZGhAtl4+mYREpzlRI05UkW2rH7Ubn9z8uATPGg obsgvGTIk1QgNWCscRPRtLC/d6aJDrXrafl74xJkYFMmrpTnCrjEPgA09rWT3Sp2VsvB 14IXE0yYx4FvOkCEpzBX2/c8riX1ZcsAgi1RBhFioEvNRAdzBn9vvGjrYjqTatkqH5ii 59M57NhhduPqkgyDee69EtFPAfmT72ToLCyzLS2TwfoXVzGl8JRSJiu4imOmvGnt7QJU /7TLGMb3+qqvA8mjJHG5gNOsr2EL6FqZhXg/PHsf12D3WfR86oixFtnjAwVbowD5sLOV j8WA== X-Gm-Message-State: AOAM531VY1NypCI49qNW8DiaFPYRJQZb3LgDfCHOFXZZuo9bWDu+rAxE chT3+T25IPaYInnGOdt9sMS0Ead8aBmzeOP1Zj0F0GRmcJ7I8mDvUzTldNvgaIsYoGKYU/uZew/ a4vLo0vRe2q0h6NsysfxpTHI2tXtOlq3XUn5g8yJZPGeuV7yhxgiwMAtv2VPaO7J4W3hWl6GHI7 yR8oy8hgYE3oIzE+4nUgzJaOilWDEtqsxbzh/RNJLlyY1nzP6csX2d X-Google-Smtp-Source: ABdhPJzqfPXlusWvAl4qFTX/5Ga966YHAHZpK7TNWZm6MHMYr4iPnTjgB2wJ79+lIALUyOVzS3+qKw== X-Received: by 2002:aa7:8749:0:b029:2f1:3dd0:674 with SMTP id g9-20020aa787490000b02902f13dd00674mr17812610pfo.65.1624253151085; Sun, 20 Jun 2021 22:25:51 -0700 (PDT) Received: from ?IPv6:2600:6c50:157f:eb87:312a:3853:88ca:1561? ([2600:6c50:157f:eb87:312a:3853:88ca:1561]) by smtp.gmail.com with ESMTPSA id w7sm13899599pjy.11.2021.06.20.22.25.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Jun 2021 22:25:50 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.6\)) Subject: Re: Optionally automatically disable logical replication subscriptions on error From: Mark Dilger In-Reply-To: Date: Sun, 20 Jun 2021 22:25:48 -0700 Cc: Masahiko Sawada , "Smith, Peter" , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <14738A39-8000-463E-A0BA-6729930A32DA@enterprisedb.com> To: Amit Kapila X-Mailer: Apple Mail (2.3608.120.23.2.6) 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 Jun 20, 2021, at 10:11 PM, Amit Kapila = wrote: >=20 > However, I see a different case where there could be > multiple failing xids and that can happen during initial table sync > where multiple workers failed due to some error. I am not sure your > patch would be able to capture all such failed transactions because > you are recording this information in pg_subscription and not in > pg_subscription_rel. Right, I wasn't trying to capture everything, just enough to give the = user a reasonable indication of what went wrong. My patch was designed = around the idea that the user would need to figure out how to fix the = subscriber side prior to re-enabling the subscription. As such, I = wasn't bothered with trying to store everything, just enough to give the = user a clue where to look. I don't mind if you want to store more = information, and maybe that needs to be stored somewhere else. Do you = believe pg_subscription_rel is a suitable location?=20 =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company