Re: Enumize logical replication message actions

Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>

From: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>, Ashutosh Bapat <ashutosh.bapat@2ndquadrant.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Andres Freund <andres@anarazel.de>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-11-26T06:22:02Z
Lists: pgsql-hackers
On Thu, Nov 26, 2020 at 10:15 AM Amit Kapila <amit.kapila16@gmail.com>
wrote:

> On Wed, Nov 25, 2020 at 2:52 PM Amit Kapila <amit.kapila16@gmail.com>
> wrote:
> >
> > On Wed, Nov 25, 2020 at 2:26 PM Peter Smith <smithpb2250@gmail.com>
> wrote:
> > >
> > > Hi Hackers.
> > >
> > > Last month there was a commit [1] for replacing logical replication
> > > message type characters with enums of equivalent values.
> > >
> > > I was revisiting this code recently and I think due to oversight that
> > > initial patch was incomplete. IIUC there are several more enum
> > > substitutions which should have been made.
> > >
> > > PSA my patch which adds those missing substitutions.
> > >
> >
> > Good catch. I'll review it in a day or so.
> >
>
> The patch looks good to me and I have pushed it.
>

Thanks Peter and Amit for noticing the missing substitutions and fixing
those.

--
Best Wishes,
Ashutosh

Commits

  1. Use Enums for logical replication message types at more places.

  2. Use Enum for top level logical replication message types.