Re: Optionally automatically disable logical replication subscriptions on error

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Optionally automatically disable logical replication subscriptions on error
Дата
Msg-id CAA4eK1J88-0FEDzKqWJz6bVboOpBMRSkGJSr9xZeFLObnJssQQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Optionally automatically disable logical replication subscriptions on error  (Mark Dilger <mark.dilger@enterprisedb.com>)
Список pgsql-hackers
On Mon, Dec 6, 2021 at 10:07 AM Mark Dilger
<mark.dilger@enterprisedb.com> wrote:
>
> > On Dec 1, 2021, at 8:48 PM, Amit Kapila <amit.kapila16@gmail.com> 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
transactionwhich, in the absence of human intervention, was guaranteed to simply fail again ad infinitum.  Retrying in
theface of resource errors is not *absurd* even though it might fail again ad infinitum.  The reason is that there is
atleast 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
possiblysucceed without human intervention."  We shouldn't need to categorize all error codes perfectly, as long as
we'reconservative.  What I propose is similar to how we determine whether to mark a function leakproof; we don't have
tomark 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
sufficientanalysis. 
>

Yeah, an empty list is a sort of what I thought was a good start
point. I feel we should learn from real-world use cases to see if
people really want to continue retrying even after using this option.


--
With Regards,
Amit Kapila.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "osumi.takamichi@fujitsu.com"
Дата:
Сообщение: RE: Optionally automatically disable logical replication subscriptions on error
Следующее
От: Shinya Kato
Дата:
Сообщение: Re: [Proposal] Add foreign-server health checks infrastructure