| From: | Aleksander Alekseev <aleksander(at)tigerdata(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Cc: | Peter Smith <smithpb2250(at)gmail(dot)com> |
| Subject: | Re: use the malloc macros in pg_dump.c |
| Date: | 2026-02-02 12:38:04 |
| Message-ID: | CAJ7c6TOJVfBf-QZP3RvNMbHQKzgKA9Vkd6g34ZMxd-LqGKoRUA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Peter,
> I found that pg_dump.c has many pg_mallocs where the new object/array
> macros could have been used, but currently they are not. I'm not sure
> if this was a deliberate or accidental omission.
>
> In case it was accidental, here is a patch to modify/simplify all that
> allocation code.
Thanks for the patch. I reviewed / tested it and it looks OK. This
being said, I see many pieces of code left that still use pg_malloc /
pg_realloc in a similar fashion, including src/bin/pg_dump/* files.
Would you like to address those as well, or keep the scope only to
pg_dump.c?
--
Best regards,
Aleksander Alekseev
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuya Kawata | 2026-02-02 13:09:01 | Re: [PATCH] ANALYZE: hash-accelerate MCV tracking for equality-only types |
| Previous Message | Rahila Syed | 2026-02-02 12:28:21 | Re: Enhancing Memory Context Statistics Reporting |