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