RE: Use allocation macros in the logical replication code

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Peter Smith' <smithpb2250(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: Use allocation macros in the logical replication code
Date: 2026-02-04 02:47:16
Message-ID: OS9PR01MB1214900E0D6698FF1D30F6706F598A@OS9PR01MB12149.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Peter,

Thanks for the patch. I have one comment for the patch:
```
@@ -836,8 +836,9 @@ SnapBuildAddCommittedTxn(SnapBuild *builder, TransactionId xid)
elog(DEBUG1, "increasing space for committed transactions to %u",
(uint32) builder->committed.xcnt_space);

- builder->committed.xip = repalloc(builder->committed.xip,
- builder->committed.xcnt_space * sizeof(TransactionId));
+ builder->committed.xip = repalloc_array(builder->committed.xip,
+ TransactionId,
+ builder->committed.xcnt_space);
```

Number of tabs seems not to enough here. Other than that LGTM.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2026-02-04 03:06:35 Re: Remove freelist reference in buf_init.c
Previous Message Zane Duffield 2026-02-04 02:42:49 Proposal: pg_createsubscriber use without superuser privileges