| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
| Cc: | Ashutosh Bapat <ashutosh(dot)bapat(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Enumize logical replication message actions |
| Date: | 2020-10-19 23:27:53 |
| Message-ID: | 20201019232753.4cf76sa42z4emqpb@alap3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2020-10-19 23:32:34 | Re: Hash support for row types |
| Previous Message | Andres Freund | 2020-10-19 23:20:34 | Re: [PATCH] Add extra statistics to explain for Nested Loop |