Re: Enumize logical replication message actions - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Enumize logical replication message actions
Date
Msg-id 20201019232753.4cf76sa42z4emqpb@alap3.anarazel.de
Whole thread Raw
In response to Enumize logical replication message actions  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Responses Re: Enumize logical replication message actions
List pgsql-hackers
Hi,

On 2020-10-16 12:55:26 +0530, Ashutosh Bapat wrote:
> Here's a patch simplifying that for top level logical replication
> messages.

I think that's a good plan. One big benefit for me is that it's much
easier to search for an enum than for a single letter
constant. Including searching for all the places that deal with any sort
of logical rep message type.


>  void
>  logicalrep_write_begin(StringInfo out, ReorderBufferTXN *txn)
>  {
> -    pq_sendbyte(out, 'B');        /* BEGIN */
> +    pq_sendbyte(out, LOGICAL_REP_MSG_BEGIN);        /* BEGIN */

I think if we have the LOGICAL_REP_MSG_BEGIN we don't need the /* BEGIN */.


Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [PATCH] Add extra statistics to explain for Nested Loop
Next
From: Andres Freund
Date:
Subject: Re: Hash support for row types