pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use palloc_object() and palloc_array() in more areas of the logi
Date: Fri, 06 Mar 2026 18:50:43 +0000
Message-ID: <E1vyaG3-002iaA-0i@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/50ea4e09b6c2331b4cc6434fa12b43bc62de682c

Modified Files
--------------
src/backend/replication/logical/proto.c         |  2 +-
src/backend/replication/logical/reorderbuffer.c |  8 ++++----
src/backend/replication/logical/snapbuild.c     |  7 ++++---
src/backend/replication/logical/tablesync.c     |  4 ++--
src/backend/replication/logical/worker.c        | 14 +++++++-------
5 files changed, 18 insertions(+), 17 deletions(-)



view thread (4+ messages)

Message-ID: <E1vyaG3-002iaA-0i@gemulon.postgresql.org>
Permalink:  ../E1vyaG3-002iaA-0i@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vyaG3-002iaA-0i@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Use palloc_object() and palloc_array() in more areas of the logi
  In-Reply-To: <E1vyaG3-002iaA-0i@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox