| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> |
| Cc: | Lakshmi N <lakshmin(dot)jhs(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] Fix Int32GetDatum used for bool column in CREATE SUBSCRIPTION |
| Date: | 2026-04-28 10:57:45 |
| Message-ID: | CAA4eK1+m1j6Rahj+cB7acxL5hgHVAYTX2kCfPk_YZbywaPNgDg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Apr 27, 2026 at 1:59 PM Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> wrote:
>
> On Mon, Apr 27, 2026 at 11:03 AM Lakshmi N <lakshmin(dot)jhs(at)gmail(dot)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.
>
Pushed.
--
With Regards,
Amit Kapila.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2026-04-28 10:58:29 | Re: [Patch]: Fix excessive ProcArrayLock acquisitions with subscription max_retention_duration=0 |
| Previous Message | Richard Guo | 2026-04-28 10:09:06 | Re: Remove inner joins based on foreign keys |