pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: In pg_dump, remember connection passwords no matter how we got t 4+ messages / 1 participants [nested] [flat]
* pgsql: In pg_dump, remember connection passwords no matter how we got t @ 2015-12-23 19:26 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2015-12-23 19:26 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/a21994c1bf9e61d263a870c98ba1e5f559107b4e Modified Files -------------- src/bin/pg_dump/pg_backup_db.c | 52 +++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 17 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: In pg_dump, remember connection passwords no matter how we got t @ 2015-12-23 19:26 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2015-12-23 19:26 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/534a4159c290bd1d49bad702f7f600f92cfdcd67 Modified Files -------------- src/bin/pg_dump/pg_backup_db.c | 52 +++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 17 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: In pg_dump, remember connection passwords no matter how we got t @ 2015-12-23 19:26 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2015-12-23 19:26 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/1aa41e3eae3746e05d0e23286ac740a9a6cee7df Modified Files -------------- src/bin/pg_dump/pg_backup_db.c | 52 +++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 17 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: In pg_dump, remember connection passwords no matter how we got t @ 2015-12-23 19:26 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2015-12-23 19:26 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/f56802a2d06f5f995c7eb1513d8ef5b978a8471c Modified Files -------------- src/bin/pg_dump/pg_backup_db.c | 52 +++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 17 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2015-12-23 19:26 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-12-23 19:26 pgsql: In pg_dump, remember connection passwords no matter how we got t Tom Lane <tgl@sss.pgh.pa.us> 2015-12-23 19:26 pgsql: In pg_dump, remember connection passwords no matter how we got t Tom Lane <tgl@sss.pgh.pa.us> 2015-12-23 19:26 pgsql: In pg_dump, remember connection passwords no matter how we got t Tom Lane <tgl@sss.pgh.pa.us> 2015-12-23 19:26 pgsql: In pg_dump, remember connection passwords no matter how we got t Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox