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 1lv9dv-0001Oe-5X for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Jun 2021 02:26:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lv9du-0008VP-2Q for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Jun 2021 02:26:30 +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 1lv9dt-0008VH-L6 for pgsql-hackers@lists.postgresql.org; Mon, 21 Jun 2021 02:26:29 +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 1lv9dq-0004GY-GK for pgsql-hackers@lists.postgresql.org; Mon, 21 Jun 2021 02:26:28 +0000 Received: by mail-pg1-x52c.google.com with SMTP id n12so4166065pgs.13 for ; Sun, 20 Jun 2021 19:26:26 -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=3qvGQyDEyQolrbPaTqXN17jg08k/uxiugd9+MrQgtDA=; b=T/5NK5ngUU28M2IUK4lvxES4oYgQ99uDcSTvvAdjBI1JHwalKUAjOnuMknjh+U06kQ gQ1ZQSNANlWg0Pu+KY36spQtWtrfAknb4kIxgn1qs5GleuS61CHgYafVz+ybNVcyaKVC KBmyfp1J9Ud5h7ovEabhUxs4gotlouXIJcgSW4aHOjs/raUgiUGWyCa3K6Insixn0lim ZFtcD6Ddy7QVLZmGISkGLNt0tXF9qA+4b5C5N1+tmamUrcTMlwLyR4OmmVzTxESS+4Ij w/sgtkhuMwY+WES2112mEcJSXX0D4oASZL22qVxT14V6c0XB31knjtv3Xjc5DKBva1VP ifZg== 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=3qvGQyDEyQolrbPaTqXN17jg08k/uxiugd9+MrQgtDA=; b=h/N0idZeZNTV+7xPZIyiy4KNqb62B2dUkNmzIc8ZG+0MzSo0mOJs2RCYf73nPThkhO sf/yVU/ea1iL4Z3P9QdkYV2DZ5lKLVSGe86iV60b6p6glS/uBj0rlqhM9v99xZmE6N+g upvafQz47szVPDYuAZEg+Zd+Jyl3I15cCLUjugXbYupkSsysrTcxDqYCi+Lp2opRxfuV wIURweewtD8mpxs36HQKnpxOPMHwviccCNkDU1H6aPDja3W9T1Z83WEvazd3qfThC7+l IpdcJDwmxusqyWeXphgrUwb96f89E/YXEdPrDuqAKfutXYmy+lkK77iecHX7e2nK4+mV 5tOw== X-Gm-Message-State: AOAM532GS3Z1yGYn7VJR4Y30bCMSrcGd7aljzF7spHLdw6uzkxHT9O+V bTVn4/DEMwunwyagjKeKB9wgNVYxsgBTtUfrGMUIO1cnT45rnwydekE6XnrYvEODu/I1Zu01hUz UD462YkatN2+5r+ZZhb/jiO99tZzAS7MR/s7LDjMWHxfRb3NbDIOwNs/9iTFl4dXsT7h/zigAJs 3b1gwpya1WVQm5EC+u12brLr6CmLOkvXO9Flpk/HlagIx0nLTcsAURChMT+2h6 X-Google-Smtp-Source: ABdhPJxatz4T32+SAcQxT788YRqhyTsjWlMtJVC8sOCrNX12HpOibjnE4/RCJNHXBy6rSbTHHdRy+Q== X-Received: by 2002:a63:fd17:: with SMTP id d23mr22061808pgh.68.1624242385322; Sun, 20 Jun 2021 19:26:25 -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 u125sm13707951pfu.95.2021.06.20.19.26.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Jun 2021 19:26:24 -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 19:26:23 -0700 Cc: Amit Kapila , "Smith, Peter" , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Masahiko Sawada 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 7:17 PM, Masahiko Sawada = wrote: >=20 > I will submit the patch. Great, thanks! > There was a discussion that the skipping transaction patch would also > need to have a feature that tells users the details of the last > failure transaction such as its XID, timestamp, action etc. In that > sense, those two patches might need the common infrastructure that the > apply workers leave the error details somewhere so that the users can > see it. Right. Subscription on error triggers would need that, too, if we wrote = them. > Is it really useful to write only error message to the system catalog? > Even if we see the error message like "duplicate key value violates > unique constraint =E2=80=9Ctest_tab_pkey=E2=80=9D=E2=80=9D on the = system catalog, we will end > up needing to check the server log for details to properly resolve the > conflict. If the user wants to know whether the subscription is > disabled manually or automatically, the error message on the system > catalog might not necessarily be necessary. We can put more information in there. I don't feel strongly about it. = I'll wait for your patch to see what infrastructure you need. > The feature discussed in that thread is meant to be a repair tool for > the subscription in emergency cases when something that should not > have happened happened. I guess that resolving row (or column) level > conflict should be done in another way, for example, by defining > policies for each type of conflict. I understand that is the idea, but I'm having trouble believing it will = work that way in practice. If somebody has a subscription that has gone = awry, what reason do we have to believe there will only be one = transaction that will need to be manually purged? It seems just as = likely that there would be a million transactions that need to be = purged, and creating an interface for users to manually review them and = keep or discard on a case by case basis seems unworkable. Sure, you = might have specific cases where the number of transactions to purge is = small, but I don't like designing the feature around that assumption. All the same, I'm looking forward to seeing your patch! =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company