Re: Remove MsgType type

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remove MsgType type
Date: 2025-12-22 09:06:41
Message-ID: 73216AB2-BABD-448C-9869-3FE8E8540177@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Dec 22, 2025, at 16:46, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> Presumably, the C type MsgType was meant to hold the protocol message type in the pre-version-3 era, but this was never fully developed even then, and the name is pretty confusing nowadays. It has only one vestigial use for cancel requests that we can get rid of. Since a cancel request is indicated by a special protocol version number, we can use the ProtocolVersion type, which MsgType was based on. (If this is also found confusing, we could also use uint32 directly.)
> <0001-Remove-MsgType-type.patch>

LGTM. I searched over the source tree, MsgType had only a single usage before the patch, so it makes sense to remove it.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2025-12-22 09:24:48 Re: Fix wrong reference in pg_overexplain's doc
Previous Message Grigoriy Novikov 2025-12-22 09:06:10 Re: [PATCH] Add cascade synchronous replication