| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: pg_dump: Use pg_malloc_object() and pg_malloc_array() |
| Date: | 2026-02-13 10:49:21 |
| Message-ID: | E1vqqjg-000YgL-0O@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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 <smithpb2250(at)gmail(dot)com>
Reviewed-by: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2026-02-13 10:52:00 | pgsql: doc: Update docs images README with required ditaa version |
| Previous Message | Daniel Gustafsson | 2026-02-13 10:43:22 | pgsql: Restart BackgroundPsql's timer more nicely. |