RE: Optionally automatically disable logical replication subscriptions on error - Mailing list pgsql-hackers

From osumi.takamichi@fujitsu.com
Subject RE: Optionally automatically disable logical replication subscriptions on error
Date
Msg-id TYCPR01MB837398F781D4B21A94B4EDE0ED639@TYCPR01MB8373.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Optionally automatically disable logical replication subscriptions on error  (vignesh C <vignesh21@gmail.com>)
Responses Re: Optionally automatically disable logical replication subscriptions on error
Re: Optionally automatically disable logical replication subscriptions on error
List pgsql-hackers
On Monday, November 22, 2021 3:53 PM vignesh C <vignesh21@gmail.com> wrote:
> Few comments:
Thank you so much for your review !

> 1) Changes to handle pg_dump are missing. It should be done in
> dumpSubscription and getSubscriptions
Fixed.

> 2) "And" is missing
> --- a/doc/src/sgml/ref/alter_subscription.sgml
> +++ b/doc/src/sgml/ref/alter_subscription.sgml
> @@ -201,8 +201,8 @@ ALTER SUBSCRIPTION <replaceable
> class="parameter">name</replaceable> RENAME TO <
>        information.  The parameters that can be altered
>        are <literal>slot_name</literal>,
>        <literal>synchronous_commit</literal>,
> -      <literal>binary</literal>, and
> -      <literal>streaming</literal>.
> +      <literal>binary</literal>,<literal>streaming</literal>
> +      <literal>disable_on_error</literal>.
> Should be:
> -      <literal>binary</literal>, and
> -      <literal>streaming</literal>.
> +      <literal>binary</literal>,<literal>streaming</literal>, and
> +      <literal>disable_on_error</literal>.
Fixed.

> 3) Should we change this :
> +          Specifies whether the subscription should be automatically
> disabled
> +          if replicating data from the publisher triggers non-transient errors
> +          such as referential integrity or permissions errors. The default is
> +          <literal>false</literal>.
> to:
> +          Specifies whether the subscription should be automatically
> disabled
> +          while replicating data from the publisher triggers
> non-transient errors
> +          such as referential integrity, permissions errors, etc. The
> default is
> +          <literal>false</literal>.
I preferred the previous description. The option
"disable_on_error" works with even one error.
If we use "while", the nuance would be like
we keep disabling a subscription more than once.
This situation happens only when user makes
the subscription enable without resolving the non-transient error,
which sounds a bit unnatural. So, I wanna keep the previous description.
If you are not satisfied with this, kindly let me know.

This v7 uses v26 of skip xid patch [1]

[1] - https://www.postgresql.org/message-id/CAD21AoDNe_O%2BCPucd_jQPu3gGGaCLNP%2BJ_kSPNecTdAM8HFPww%40mail.gmail.com

Best Regards,
    Takamichi Osumi


Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: prevent immature WAL streaming
Next
From: Tom Lane
Date:
Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file