On Tue, Mar 9, 2021 at 9:14 AM Peter Smith <smithpb2...@gmail.com> wrote:
>
> On Mon, Mar 8, 2021 at 4:58 PM vignesh C <vignes...@gmail.com> wrote:
> >
> >         LOGICAL_REP_MSG_TYPE = 'Y',
> > +       LOGICAL_REP_MSG_BEGIN_PREPARE = 'b',
> > +       LOGICAL_REP_MSG_PREPARE = 'P',
> > +       LOGICAL_REP_MSG_COMMIT_PREPARED = 'K',
> > +       LOGICAL_REP_MSG_ROLLBACK_PREPARED = 'r',
> >         LOGICAL_REP_MSG_STREAM_START = 'S',
> >         LOGICAL_REP_MSG_STREAM_END = 'E',
> >         LOGICAL_REP_MSG_STREAM_COMMIT = 'c',
> > -       LOGICAL_REP_MSG_STREAM_ABORT = 'A'
> > +       LOGICAL_REP_MSG_STREAM_ABORT = 'A',
> > +       LOGICAL_REP_MSG_STREAM_PREPARE = 'p'
> >  } LogicalRepMsgType;
> > As we start adding more and more features, we will have to start
> > adding more message types, using meaningful characters might become
> > difficult. Should we start using numeric instead for the new feature
> > getting added?
>
> This may or may not become a problem sometime in the future, but I
> think the feedback is not really specific to the current patch set so
> I am skipping it at this time.
>
> If you want, maybe create it as a separate thread, Is it OK?

I was thinking of changing the newly added message types to something
like below:
>         LOGICAL_REP_MSG_TYPE = 'Y',
> +       LOGICAL_REP_MSG_BEGIN_PREPARE = 1,
> +       LOGICAL_REP_MSG_PREPARE = 2,
> +       LOGICAL_REP_MSG_COMMIT_PREPARED = 3,
> +       LOGICAL_REP_MSG_ROLLBACK_PREPARED = 4,
>         LOGICAL_REP_MSG_STREAM_START = 'S',
>         LOGICAL_REP_MSG_STREAM_END = 'E',
>         LOGICAL_REP_MSG_STREAM_COMMIT = 'c',
> -       LOGICAL_REP_MSG_STREAM_ABORT = 'A'
> +       LOGICAL_REP_MSG_STREAM_ABORT = 'A',
> +       LOGICAL_REP_MSG_STREAM_PREPARE = 5
>  } LogicalRepMsgType;

Changing these values at a later time may become difficult as it can
break backward compatibility. But if you feel the existing values are
better we can keep it as it is and think of it later when we add more
message types.

Regards,
Vignesh


Reply via email to