Use palloc_object() and palloc_array() in more areas of the logical replication.
Masahiko Sawada <msawada@postgresql.org>
Author:
Masahiko Sawada <msawada@postgresql.org>
Date: 2026-03-06T18:49:50Z
Releases:
19 (unreleased)
Use palloc_object() and palloc_array() in more areas of the logical replication. The idea is to encourage the use of newer routines across the tree, as these offer stronger type-safety guarantees than raw palloc(). Similar work has been done in commits 1b105f9472bd, 0c3c5c3b06a3, 31d3847a37be, and 4f7dacc5b82a. This commit extends those changes to more locations within src/backend/replication/logical/. Author: Peter Smith <smithpb2250@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CAHut+Pv4N7Vpxo18+NAR1r9RGvR8b0BtwTkoeCE2PfFoXgmR6A@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/replication/logical/proto.c | modified | +1 −1 |
| src/backend/replication/logical/reorderbuffer.c | modified | +4 −4 |
| src/backend/replication/logical/snapbuild.c | modified | +4 −3 |
| src/backend/replication/logical/tablesync.c | modified | +2 −2 |
| src/backend/replication/logical/worker.c | modified | +7 −7 |
Discussion
- Use allocation macros in the logical replication code 8 messages · 2026-02-04 → 2026-03-10