Re: Conflict detection for update_deleted in logical replication

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: Conflict detection for update_deleted in logical replication
Date: 2025-05-20 05:40:14
Message-ID: CAJpy0uCgEwT4dpoxELpz3706Q=EVs_W=B3kApOEGmViehVavZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 20, 2025 at 10:24 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Tue, May 20, 2025 at 8:38 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
> >
> > Please find few more comments:
> >
> > 1)
> > ProcessStandbyPSRequestMessage:
> > + /*
> > + * This shouldn't happen because we don't support getting primary status
> > + * message from standby.
> > + */
> > + if (RecoveryInProgress())
> > + elog(ERROR, "the primary status is unavailable during recovery");
> >
> >
> > a) This error is not clear. Is it supposed to be user oriented error
> > or internal error? As a user, it is difficult to interpret this error
> > and take some action.
> >
>
> This is an internal error for developers to understand that they have
> sent the wrong message. Do you have any suggestions to change it?

The current message is fine if point b) is already taken care of.

>
> > b) What I understood is that there is no user of enabling
> > 'retain_conflict_info' for a subscription which is subscribing to a
> > publisher which is physical standby too. So shall we emit such an
> > ERROR during 'Create Sub(retain_conflict_info=on)' itself? But that
> > would need checking whether the publisher is physical standby or not
> > during CREATE-SUB. Is that a possibility?
> >
>
> The 0003 patch already took care of this, see check_conflict_info_retaintion.
>

Okay, thanks. Missed it somehow during review.

thanks
Shveta

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2025-05-20 05:43:04 Re: Logical Replication of sequences
Previous Message Tatsuo Ishii 2025-05-20 05:39:46 Re: Adding null patch entry to cfbot/CommitFest