postgresql/src/bin/pg_dump
Tom Lane 70bef49400 Fix minor memory leaks in pg_dump.
I found these by running pg_dump under "valgrind --leak-check=full".

The changes in flagInhIndexes() and getIndexes() replace allocation of
an array of which we use only some elements by individual allocations
of just the actually-needed objects.  The previous coding wasted some
memory, but more importantly it confused valgrind's leak tracking.

collectComments() and collectSecLabels() remain major blots on
the valgrind report, because they don't PQclear their query
results, in order to avoid a lot of strdup's.  That's a dubious
tradeoff, but I'll leave it alone here; an upcoming patch will
modify those functions enough to justify changing the tradeoff.
2021-10-24 12:38:26 -04:00
..
po Translation updates 2021-06-21 12:33:50 +02:00
t Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
.gitignore Clean up after pg_dump test runs. 2016-05-06 22:28:01 -04:00
common.c Fix minor memory leaks in pg_dump. 2021-10-24 12:38:26 -04:00
compress_io.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
compress_io.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
dumputils.c Dump public schema ownership and security labels. 2021-06-28 18:34:55 -07:00
dumputils.h Dump public schema ownership and security labels. 2021-06-28 18:34:55 -07:00
Makefile Update copyright for 2021 2021-01-02 13:06:25 -05:00
nls.mk Translation updates 2021-05-10 14:36:21 +02:00
parallel.c Factor out system call names from error messages 2021-04-23 14:21:37 +02:00
parallel.h Add missing header declarations for pg_basebackup and pg_{dump,restore} 2021-07-24 19:05:14 +09:00
pg_backup.h In pg_dump, use simplehash.h to look up dumpable objects by OID. 2021-10-22 17:19:03 -04:00
pg_backup_archiver.c Fix minor memory leaks in pg_dump. 2021-10-24 12:38:26 -04:00
pg_backup_archiver.h Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
pg_backup_custom.c Yet more elimination of dead stores and useless initializations. 2020-09-05 13:17:32 -04:00
pg_backup_db.c Avoid redundantly prefixing PQerrorMessage for a connection failure. 2021-01-22 16:52:31 -05:00
pg_backup_db.h Revert "pg_dump: Lock all relations, not just plain tables". 2020-11-06 15:48:04 -05:00
pg_backup_directory.c Fix bug in TOC file error message printing 2021-10-19 12:59:54 +02:00
pg_backup_null.c Remove useless "return;" lines 2019-11-28 16:48:37 -03:00
pg_backup_tar.c Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
pg_backup_tar.h Fix tar files emitted by pg_dump and pg_basebackup to be POSIX conformant. 2012-09-28 15:19:15 -04:00
pg_backup_utils.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_backup_utils.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_dump.c Fix minor memory leaks in pg_dump. 2021-10-24 12:38:26 -04:00
pg_dump.h In pg_dump, use simplehash.h to look up dumpable objects by OID. 2021-10-22 17:19:03 -04:00
pg_dump_sort.c Dump ALTER TABLE ... ATTACH PARTITION as a separate ArchiveEntry. 2021-01-11 21:09:18 -05:00
pg_dumpall.c Add --no-toast-compression to pg_dumpall 2021-05-19 09:38:48 +09:00
pg_restore.c Unify parsing logic for command-line integer options 2021-07-24 18:35:03 +09:00