RE: Use allocation macros in the logical replication code - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Use allocation macros in the logical replication code
Date
Msg-id OS9PR01MB1214900E0D6698FF1D30F6706F598A@OS9PR01MB12149.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Use allocation macros in the logical replication code  (Peter Smith <smithpb2250@gmail.com>)
Responses Re: Use allocation macros in the logical replication code
List 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


pgsql-hackers by date:

Previous
From: Zane Duffield
Date:
Subject: Proposal: pg_createsubscriber use without superuser privileges
Next
From: Ashutosh Bapat
Date:
Subject: Re: Remove freelist reference in buf_init.c