RE: Optionally automatically disable logical replication subscriptions on error

From: "osumi(dot)takamichi(at)fujitsu(dot)com" <osumi(dot)takamichi(at)fujitsu(dot)com>
To: 'Greg Nancarrow' <gregn4422(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, "Smith, Peter" <peters(at)fast(dot)au(dot)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: Optionally automatically disable logical replication subscriptions on error
Date: 2021-12-16 12:51:04
Message-ID: TYCPR01MB837344D0306FFCAAE280F498ED779@TYCPR01MB8373.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday, December 16, 2021 2:32 PM Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
> On Tue, Dec 14, 2021 at 4:34 PM osumi(dot)takamichi(at)fujitsu(dot)com
> <osumi(dot)takamichi(at)fujitsu(dot)com> wrote:
> >
> > Besides all of those changes, I've removed the obsolete comment of
> > DisableSubscriptionOnError in v12.
> >
>
> I have a few minor comments, otherwise the patch LGTM at this point:
Thank you for your review !

> doc/src/sgml/catalogs.sgml
> (1)
> Current comment says:
>
> + If true, the subscription will be disabled when subscription's
> + worker detects any errors
>
> However, in create_subscription.sgml, it says "disabled if any errors are
> detected by subscription workers ..."
>
> For consistency, I think it should be:
>
> + If true, the subscription will be disabled when subscription
> + workers detect any errors
Okay. Fixed.

> src/bin/psql/describe.c
> (2)
> I think that:
>
> + gettext_noop("Disable On Error"));
>
> should be:
>
> + gettext_noop("Disable on error"));
>
> for consistency with the uppercase/lowercase usage on other similar entries?
> (e.g. "Two phase commit")
Agreed. Fixed.

> src/include/catalog/pg_subscription.h
> (3)
>
> + bool subdisableonerr; /* True if apply errors should disable the
> + * subscription upon error */
>
> The comment should just say "True if occurrence of apply errors should disable
> the subscription"
Fixed.

Attached the updated patch v14.

Best Regards,
Takamichi Osumi

Attachment Content-Type Size
v14-0001-Optionally-disable-subscriptions-on-error.patch application/octet-stream 49.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message osumi.takamichi@fujitsu.com 2021-12-16 13:21:22 RE: Failed transaction statistics to measure the logical replication progress
Previous Message Masahiko Sawada 2021-12-16 12:42:54 Re: parallel vacuum comments