Re: [PATCH] Fix Int32GetDatum used for bool column in CREATE SUBSCRIPTION - Mailing list pgsql-hackers

From Nisha Moond
Subject Re: [PATCH] Fix Int32GetDatum used for bool column in CREATE SUBSCRIPTION
Date
Msg-id CABdArM4nF-QTeOsGt40NAngeeH7yJ4RVtMU4hWjVM4=fNYPrdw@mail.gmail.com
Whole thread
In response to [PATCH] Fix Int32GetDatum used for bool column in CREATE SUBSCRIPTION  (Lakshmi N <lakshmin.jhs@gmail.com>)
Responses Re: [PATCH] Fix Int32GetDatum used for bool column in CREATE SUBSCRIPTION
List pgsql-hackers
On Mon, Apr 27, 2026 at 11:03 AM Lakshmi N <lakshmin.jhs@gmail.com> wrote:
>
> Hi hackers,
>
> In CreateSubscription(), the subretentionactive catalog column (declared as
> bool in pg_subscription.h) is populated using Int32GetDatum() instead of
> BoolGetDatum():
>
> This writes 4 bytes into a 1-byte bool Datum. It is inconsistent with the
> ALTER SUBSCRIPTION path which correctly uses BoolGetDatum().
>
> The attached patch fixes this to use BoolGetDatum(), matching both the
> catalog definition and the ALTER path.
>

+1
This looks like an oversight in commit a850be2.

--
Thanks,
Nisha



pgsql-hackers by date:

Previous
From: Andrei Lepikhov
Date:
Subject: Re: A very quick observation of dangling pointers in Postgres pathlists
Next
From: Bharath Rupireddy
Date:
Subject: Re: Fix race condition in pg_get_publication_tables with concurrent DROP TABLE