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@gmail.com>
Reviewed-by: Aleksander Alekseev <aleksander@tigerdata.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(-)