[PATCH] Fix Int32GetDatum used for bool column in CREATE SUBSCRIPTION

Lakshmi N <lakshmin.jhs@gmail.com>

From: Lakshmi N <lakshmin.jhs@gmail.com>
To: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-27T05:33:00Z
Lists: pgsql-hackers

Attachments

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.

Regards,
Lakshmi

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix wrong datum conversion for subretentionactive in CreateSubscription.

  2. Add max_retention_duration option to subscriptions.