Re: BUG #16604: pg_dump with --jobs breaks SSL connections
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Zsolt Ero <zsolt.ero@gmail.com>
Cc: Magnus Hagander <magnus@hagander.net>,
PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>,
Daniel Gustafsson <daniel@yesql.se>
Date: 2020-09-24T17:42:25Z
Lists: pgsql-bugs
I wrote: > Note, however, that AFAICS parallel pg_restore was okay on duplicating > the original connection parameters otherwise (the prompting issue > was because it went too far with that...). So I fail to confirm > the OP's claim that pg_restore had the same bug as parallel pg_dump. > If there really is an issue there, we'll need a test case that > demonstrates it. Hmm ... so a bit later, I have a test case that may or may not be what Zsolt saw: pg_restore -C --dbname="hostaddr=127.0.0.1 sslmode=verify-ca dbname=postgres user=postgres sslcert=client-cert.crt sslkey=client-cert.key" -Fd dumpdir pg_restore: error: could not reconnect to database: FATAL: connection requires a valid client certificate What is happening here is the exact same issue, but in ReconnectToServer/_connectDB: those functions suppose that they can blow away all the original connection parameters and insert just a database name instead. I'm inclined to think that we should get rid of _connectDB, because it seems unnecessarily duplicative with ConnectDatabase. But we'll need a bit more API refactoring than what I had. New patch coming ... regards, tom lane
Commits
-
Fix connection string handling in psql's \connect command.
- 8175da6e796e 10.15 landed
- f656517ecdf4 12.5 landed
- 20be76d5c4ac 11.10 landed
- 85c54287af56 14.0 landed
- 2e4af411075c 13.1 landed
- 870a2323033e 9.6.20 landed
- 6997da09a41f 9.5.24 landed
-
Fix connection string handling in src/bin/scripts/ programs.
- da129a04a6de 9.5.24 landed
- 68f2369930f9 10.15 landed
- 5c78f797701b 9.6.20 landed
- 5a9f99bed8cb 11.10 landed
- c6d0b9b1668c 12.5 landed
- 8e5793ab60bb 14.0 landed
- 1814f915b526 13.1 landed
-
Fix handling of -d "connection string" in pg_dump/pg_restore.
- 7c154f2fd246 9.6.20 landed
- 56b46d3a1a62 9.5.24 landed
- 1888ff8d0d5e 10.15 landed
- 1738a61c8ffe 11.10 landed
- fb93f784fc9c 12.5 landed
- cb8885ac4969 13.1 landed
- a45bc8a4f649 14.0 landed