public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: [email protected]
Subject: pgsql: pg_dump: Use pg_malloc_object() and pg_malloc_array()
Date: Fri, 13 Feb 2026 10:49:21 +0000
Message-ID: <[email protected]> (raw)
pg_dump: Use pg_malloc_object() and pg_malloc_array()
The idea is to encourage more the use of these allocation routines
across the tree, as these offer stronger type safety guarantees than
pg_malloc() & co (type cast in the result, sizeof() embedded). This set
of changes is dedicated to the pg_dump code.
Similar work has been done as of 31d3847a37be, as one example.
Author: Peter Smith <[email protected]>
Reviewed-by: Aleksander Alekseev <[email protected]>
Discussion: https://postgr.es/m/CAHut+PvpGPDLhkHAoxw_g3jdrYxA1m16a8uagbgH3TGWSKtXNQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6736dea14afbe239588dad1c947ceb6e50adbf72
Modified Files
--------------
src/bin/pg_dump/compress_gzip.c | 6 +-
src/bin/pg_dump/compress_io.c | 4 +-
src/bin/pg_dump/compress_lz4.c | 4 +-
src/bin/pg_dump/compress_none.c | 2 +-
src/bin/pg_dump/compress_zstd.c | 2 +-
src/bin/pg_dump/connectdb.c | 8 +-
src/bin/pg_dump/dumputils.c | 8 +-
src/bin/pg_dump/parallel.c | 14 +--
src/bin/pg_dump/pg_backup_archiver.c | 40 ++++----
src/bin/pg_dump/pg_backup_custom.c | 8 +-
src/bin/pg_dump/pg_backup_directory.c | 8 +-
src/bin/pg_dump/pg_dump.c | 174 +++++++++++++++++-----------------
src/bin/pg_dump/pg_dump_sort.c | 12 +--
src/bin/pg_dump/pg_dumpall.c | 2 +-
14 files changed, 145 insertions(+), 147 deletions(-)
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pgsql: pg_dump: Use pg_malloc_object() and pg_malloc_array()
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox