postgresql/src/bin/pg_dump
Tom Lane 1aa41e3eae In pg_dump, remember connection passwords no matter how we got them.
When pg_dump prompts the user for a password, it remembers the password
for possible re-use by parallel worker processes.  However, libpq might
have extracted the password from a connection string originally passed
as "dbname".  Since we don't record the original form of dbname but
break it down to host/port/etc, the password gets lost.  Fix that by
retrieving the actual password from the PGconn.

(It strikes me that this whole approach is rather broken, as it will also
lose other information such as options that might have been present in
the connection string.  But we'll leave that problem for another day.)

In passing, get rid of rather silly use of malloc() for small fixed-size
arrays.

Back-patch to 9.3 where parallel pg_dump was introduced.

Report and fix by Zeus Kronion, adjusted a bit by Michael Paquier and me
2015-12-23 14:25:53 -05:00
..
po Translation updates 2015-06-28 23:56:55 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
common.c Add transforms feature 2015-04-26 10:33:14 -04:00
compress_io.c Restore use of zlib default compression in pg_dump directory mode. 2015-07-25 17:14:36 -04:00
compress_io.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
dumputils.c Remove unnecessary escaping in C character literals 2015-12-22 22:43:46 -05:00
dumputils.h Fix whitespace 2015-09-15 15:20:13 -04:00
keywords.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
Makefile Update copyright for 2015 2015-01-06 11:43:47 -05:00
nls.mk Add missing source files to nls.mk 2014-07-15 10:10:42 -04:00
parallel.c Tweak __attribute__-wrapping macros for better pgindent results. 2015-03-26 14:03:25 -04:00
parallel.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_backup_archiver.c pg_dump: Fix some messages 2015-09-27 20:29:40 -04:00
pg_backup_archiver.h Add macros wrapping all usage of gcc's __attribute__. 2015-03-11 14:30:01 +01:00
pg_backup_custom.c pg_dump: Reduce use of global variables 2014-10-14 15:00:55 -03:00
pg_backup_db.c In pg_dump, remember connection passwords no matter how we got them. 2015-12-23 14:25:53 -05:00
pg_backup_db.h pg_dump: Reduce use of global variables 2014-10-14 15:00:55 -03:00
pg_backup_directory.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_backup_null.c pg_dump: Reduce use of global variables 2014-10-14 15:00:55 -03:00
pg_backup_tar.c Adopt the GNU convention for handling tar-archive members exceeding 8GB. 2015-11-21 20:21:31 -05: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 2015 2015-01-06 11:43:47 -05:00
pg_backup_utils.h Tweak __attribute__-wrapping macros for better pgindent results. 2015-03-26 14:03:25 -04:00
pg_backup.h Check existency of table/schema for -t/-n option (pg_dump/pg_restore) 2015-09-14 16:19:49 +03:00
pg_dump_sort.c pg_dump: Fix some messages 2015-09-27 20:29:40 -04:00
pg_dump.c ALTER TABLE .. FORCE ROW LEVEL SECURITY 2015-10-04 21:05:08 -04:00
pg_dump.h ALTER TABLE .. FORCE ROW LEVEL SECURITY 2015-10-04 21:05:08 -04:00
pg_dumpall.c pg_dump, pg_upgrade: allow postgres/template1 tablespace moves 2015-09-11 15:51:11 -04:00
pg_restore.c Review program help output for wording and formatting 2015-09-16 00:59:28 -04:00