Re: Use bool with synced field (src/include/replication/slot.h)

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use bool with synced field (src/include/replication/slot.h)
Date: 2025-09-02 16:02:37
Message-ID: aLcVHXW2tyrLfTv8@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 02, 2025 at 09:47:49AM -0300, Ranier Vilela wrote:
> IMO in the struct ReplicationSlotPersistentData, the field *synced* has
> wrong type declaration. The intention was *bool* not *char* type.
>
> Since it is only used in Boolean comparison.

LGTM. In the original thread, it looks like this was added in v32 [0] and
effectively switched to a bool in v58 [1].

[0] https://postgr.es/m/CAJpy0uC2gYybBcvYCW68wvR-3akWnFbr7x66nZg7XTyjELW9iw%40mail.gmail.com
[1] https://postgr.es/m/OS0PR01MB57169DD55EC8D9D1EDB7A0C2946A2%40OS0PR01MB5716.jpnprd01.prod.outlook.com

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-09-02 16:08:27 Re: Fixes a trivial bug in dumped parse/query/plan trees
Previous Message Tom Lane 2025-09-02 15:51:41 Re: psql client does not handle WSAEWOULDBLOCK on Windows