From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
Cc: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Euler Taveira <euler(at)eulerto(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: logicalrep_message_type throws an error |
Date: | 2023-07-22 04:47:57 |
Message-ID: | CAA4eK1+r0-s91mfa2ASYB5JM6seYq7WJGGhJD9kktjFA=vLE9Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jul 21, 2023 at 6:28 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Fri, Jul 21, 2023 at 1:39 AM Ashutosh Bapat
> <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> >
> > On Thu, Jul 20, 2023 at 9:11 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > > >
> > > > Okay, changed it accordingly.
> > > >
> > >
> > > oops, forgot to attach the patch.
> > >
> >
> > WFM
> >
> > @@ -3367,7 +3367,7 @@ apply_dispatch(StringInfo s)
> > default:
> > ereport(ERROR,
> > (errcode(ERRCODE_PROTOCOL_VIOLATION),
> > - errmsg("invalid logical replication message type
> > \"%c\"", action)));
> > + errmsg("invalid logical replication message type
> > \"??? (%d)\"", action)));
> >
> > I think we should report character here since that's what is visible
> > in the code and also the message types are communicated as characters
> > not integers. Makes debugging easier. Context may report integer as an
> > additional data point.
>
> I think it could confuse us if an invalid message is not a printable character.
>
Right. I'll push and backpatch this till 15 by Tuesday unless you guys
think otherwise.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2023-07-22 06:14:46 | Re: Row pattern recognition |
Previous Message | Vik Fearing | 2023-07-22 02:54:43 | Re: Row pattern recognition |