public inbox for [email protected]  
help / color / mirror / Atom feed
From: Mark Dilger <[email protected]>
To: Amit Kapila <[email protected]>
Cc: [email protected] <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Greg Nancarrow <[email protected]>
Cc: Masahiko Sawada <[email protected]>
Cc: Smith, Peter <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Optionally automatically disable logical replication subscriptions on error
Date: Sun, 5 Dec 2021 20:37:44 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA4eK1+VS6LiD844jOArYTXTgWfiDVUmUmbP_1gG-PvYXp_JEA@mail.gmail.com>
References: <[email protected]>
	<CAA4eK1KkhsNAW3=XxOdVRD9+RcQG5PRRFBFzAMibMG0YFFmAmg@mail.gmail.com>
	<[email protected]>
	<CAA4eK1KM23D06_rUEsgnTFUpABoeCCoTun2TMrQzWgxWOYY7fA@mail.gmail.com>
	<[email protected]>
	<CAD21AoB+QH4or-QDiakALZp6pkXiAaGxfGcsvNYJoDHk9kknZw@mail.gmail.com>
	<[email protected]>
	<CAD21AoCPSU-MBHkortBnELO7Hu0tLsX5GoOEbSYzyxKBPkKvBg@mail.gmail.com>
	<TYCPR01MB837384DA6C879A709EBF30D1ED8B9@TYCPR01MB8373.jpnprd01.prod.outlook.com>
	<CALDaNm0bXsyrXg3dQGbAhkUDGKnFXtM6mKk8d-8VFLo6wz3ZJA@mail.gmail.com>
	<TYCPR01MB8373934498C93D1A1466A2E3ED939@TYCPR01MB8373.jpnprd01.prod.outlook.com>
	<CAJcOf-ci4NeNwowE=BmtSWip2NRgZdGe-VFjvSDY2JP0NNLTMQ@mail.gmail.com>
	<TYCPR01MB8373D8A622ED51CDEF3DAF5DED949@TYCPR01MB8373.jpnprd01.prod.outlook.com>
	<CALDaNm0PdzqVSy0uUZ+UKd9rQeQONUjkALj3Ge+fAmdw0cSLgA@mail.gmail.com>
	<TYCPR01MB8373771371B31E1E6CC74B0AED999@TYCPR01MB8373.jpnprd01.prod.outlook.com>
	<CAJcOf-f6oqtKt2CD-KcUH00=3+Bybym7magDenegOao2YE-SZQ@mail.gmail.com>
	<TYCPR01MB837308EA9546476CFA0C53F0ED9B9@TYCPR01MB8373.jpnprd01.prod.outlook.com>
	<CALDaNm2g8E-cF+6DzzMe8zdeCt6Ktd454_1UFBRA+2jE3si3Zg@mail.gmail.com>
	<TYCPR01MB837398F781D4B21A94B4EDE0ED639@TYCPR01MB8373.jpnprd01.prod.outlook.com>
	<CAJcOf-c6TC37C7w4JKFDLxs3XaQO3tqhW3792T-_tv-a7hi5uA@mail.gmail.com>
	<TYCPR01MB83735AA021E0F614A3AB3221ED679@TYCPR01MB8373.jpnprd01.prod.outlook.com>
	<CALDaNm309nOxCtX0SOwHdUUp7LkrR9AYyjggGhy0zv1=2FWoiQ@mail.gmail.com>
	<TYCPR01MB8373369C42D82D8F85E4AA83ED689@TYCPR01MB8373.jpnprd01.prod.outlook.com>
	<CAA4eK1+VtBf4QC7CCd91Fh=VD_aXt83dGVVEP64YyBubEW1kVQ@mail.gmail.com>
	<TYCPR01MB83730B37108684983C8F690DED699@TYCPR01MB8373.jpnprd01.prod.outlook.com>
	<CAA4eK1+VS6LiD844jOArYTXTgWfiDVUmUmbP_1gG-PvYXp_JEA@mail.gmail.com>



> On Dec 1, 2021, at 8:48 PM, Amit Kapila <[email protected]> wrote:
> 
> 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.

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company








view thread (74+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Optionally automatically disable logical replication subscriptions on error
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox