]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Use pg_malloc_object() and pg_alloc_array() variants in frontend code
authorMichael Paquier <michael@paquier.xyz>
Fri, 27 Feb 2026 09:59:41 +0000 (18:59 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 27 Feb 2026 09:59:41 +0000 (18:59 +0900)
commit574bee89c237d79e4dd3209f0fa3b10e0179b57a
tree5b721a2a2301fae27d220162558fcfc7aed1db4b
parenta2c89835f5124f9a98edffd953f42639bf9a31b5
Use pg_malloc_object() and pg_alloc_array() variants in frontend code

This commit updates the frontend tools (src/bin/, contrib/ and
src/test/) to use the memory allocation variants based on
pg_malloc_object() and pg_malloc_array() in various code paths.  This
does not cover all the allocations, but a good chunk of them.

Like all the changes of this kind (31d3847a37be, etc.), this should
encourage any future code to use this new style.

Author: Andreas Karlsson <andreas@proxel.se>
Discussion: https://postgr.es/m/cfb645da-6b3a-4f22-9bcc-5bc46b0e9c61@proxel.se
39 files changed:
contrib/oid2name/oid2name.c
src/bin/initdb/initdb.c
src/bin/pg_amcheck/pg_amcheck.c
src/bin/pg_basebackup/pg_basebackup.c
src/bin/pg_basebackup/pg_recvlogical.c
src/bin/pg_basebackup/streamutil.c
src/bin/pg_basebackup/walmethods.c
src/bin/pg_combinebackup/load_manifest.c
src/bin/pg_combinebackup/pg_combinebackup.c
src/bin/pg_combinebackup/reconstruct.c
src/bin/pg_combinebackup/write_manifest.c
src/bin/pg_ctl/pg_ctl.c
src/bin/pg_rewind/datapagemap.c
src/bin/pg_rewind/libpq_source.c
src/bin/pg_rewind/local_source.c
src/bin/pg_rewind/pg_rewind.c
src/bin/pg_rewind/timeline.c
src/bin/pg_upgrade/check.c
src/bin/pg_upgrade/function.c
src/bin/pg_upgrade/info.c
src/bin/pg_upgrade/parallel.c
src/bin/pg_upgrade/slru_io.c
src/bin/pg_upgrade/tablespace.c
src/bin/pg_upgrade/task.c
src/bin/pg_verifybackup/astreamer_verify.c
src/bin/pg_verifybackup/pg_verifybackup.c
src/bin/pgbench/exprparse.y
src/bin/pgbench/pgbench.c
src/bin/psql/command.c
src/bin/psql/copy.c
src/bin/psql/crosstabview.c
src/bin/psql/describe.c
src/bin/psql/tab-complete.in.c
src/bin/psql/variables.c
src/bin/scripts/reindexdb.c
src/test/isolation/isolationtester.c
src/test/isolation/specparse.y
src/test/modules/libpq_pipeline/libpq_pipeline.c
src/test/regress/pg_regress.c