Re: use the malloc macros in pg_dump.c

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: use the malloc macros in pg_dump.c
Date: 2026-02-03 02:29:12
Message-ID: CAHut+PukYs+=STuhMhJC+YdwspfqxLf07DZMufn9Fyxr9G5=ug@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

PSA v2 with more of the same kind of malloc changes.

Scope: This addresses all those I could find in the src/bin/pg_dump/* folder.

Note, there were a few examples of simple char * buffer mallocs I that
did not change, because it did not seem useful to do so.

======
Kind Regards,
Peter Smith.
Fujitsu Australia

Attachment Content-Type Size
v2-0005-modify-malloc-for-pg_backup_directory.c.patch application/octet-stream 1.6 KB
v2-0004-modify-malloc-for-pg_backup_archiver.c.patch application/octet-stream 4.1 KB
v2-0001-use-the-malloc-macros-for-arrays-and-objects.patch application/octet-stream 22.5 KB
v2-0003-modify-malloc-in-pg_dump_sort.c.patch application/octet-stream 1.9 KB
v2-0002-modify-mallocs-in-dumputils.c.patch application/octet-stream 1.6 KB
v2-0007-modify-malloc-for-compress_none.c.patch application/octet-stream 846 bytes
v2-0008-modify-malloc-for-compress_gzip.c.patch application/octet-stream 1.2 KB
v2-0006-modify-malloc-for-parallel.c.patch application/octet-stream 1.9 KB
v2-0009-modify-malloc-for-pg_backup_custom.c.patch application/octet-stream 1.6 KB
v2-0010-modify-malloc-for-compress_io.c.patch application/octet-stream 1.1 KB
v2-0011-modify-malloc-for-pg_dumpall.c.patch application/octet-stream 721 bytes
v2-0012-modify-more-mallocs-in-pg_dump.c.patch application/octet-stream 2.3 KB
v2-0013-modify-malloc-for-pg_backup_archiver.c.patch application/octet-stream 2.7 KB
v2-0015-modify-malloc-for-compress_zstd.c.patch application/octet-stream 823 bytes
v2-0014-modify-malloc-for-compress_lz4.c.patch application/octet-stream 1.1 KB
v2-0016-modify-malloc-for-connectdb.c.patch application/octet-stream 1.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-02-03 02:41:15 Re: Add expressions to pg_restore_extended_stats()
Previous Message Kyotaro Horiguchi 2026-02-03 02:25:41 Re: pg_resetwal: Fix wrong directory in log output