Re: logicalrep_message_type throws an error

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Euler Taveira <euler(at)eulerto(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Subject: Re: logicalrep_message_type throws an error
Date: 2023-07-05 16:11:55
Message-ID: 20230705161155.repwy2tgvir2hcbr@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2023-Jul-05, Euler Taveira wrote:

> Isn't this numerical value already exposed in the error message (X = 88)?
> In this example, it is:
>
> ERROR: invalid logical replication message type "X"
> CONTEXT: processing remote data for replication origin "pg_16638" during message type "??? (88)" in transaction 796, finished at 0/1626698
>
> IMO it could be confusing if we provide two representations of the same data (X
> and 88). Since we already provide "X" I don't think we need "88". Another
> option, is to remove "X" from apply_dispatch() and add "??? (88)" to
> logicalrep_message_type().
>
> Opinions?

The CONTEXT message could theoretically appear in other error throws,
not just in "invalid logical replication message". So the duplicity is
not really a problem.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Now I have my system running, not a byte was off the shelf;
It rarely breaks and when it does I fix the code myself.
It's stable, clean and elegant, and lightning fast as well,
And it doesn't cost a nickel, so Bill Gates can go to hell."

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2023-07-05 17:05:36 Re: Disabling Heap-Only Tuples
Previous Message Matthias van de Meent 2023-07-05 15:58:34 Re: [PATCH] Add GitLab CI to PostgreSQL