Re: logicalrep_message_type throws an error

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: 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-11 08:05:50
Message-ID: CAD21AoBs=89deXSWzdNC8Kxk1_3Rpj9qbK49HY6-1J6ADXPXkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 6, 2023 at 6:28 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> One point to note is that the user may also get confused if the actual
> ERROR says message type as 'X' and the context says '???'. I feel in
> this case duplicate information is better than different information.

I agree. I think it would be better to show the same string like:

ERROR: invalid logical replication message type "??? (88)"
CONTEXT: processing remote data for replication origin "pg_16638"
during message type "??? (88)" in transaction 796, finished at
0/1626698

Since the numerical value is important only in invalid message type
cases, how about using a format like "??? (88)" in unknown message
type cases, in both error and context messages?

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2023-07-11 08:31:30 Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.
Previous Message Alvaro Herrera 2023-07-11 07:49:11 Re: unrecognized node type while displaying a Path due to dangling pointer