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-24T16:11:36Z
Lists: pgsql-bugs
Zsolt Ero <zsolt.ero@gmail.com> writes:
> I've created a minimal reproducible Dockerfile, it reproduces 100%. The PG
> server is configured to require client certificates.
I reproduced this locally, and the problem seems to be that
CloneArchive() is doing a far-less-than-half-baked job of
reconstructing the original connection parameters.
The data that PQconnectdbParams gets is just
(gdb) p keywords
$1 = {0x44ef22 "host", 0x44d52d "port", 0x44e4f0 "user", 0x4532b6 "password",
0x44ef14 "dbname", 0x45325f "fallback_application_name", 0x0}
(gdb) p values
$2 = {0x25459e0 "127.0.0.1", 0x25459a0 "5432", 0x2545180 "postgres", 0x0,
0x2a61d60 "dbname=regression", 0x2538410 "pg_dump", 0x0}
so parallel pg_dump is basically guaranteed to fail in any
case with even slightly unusual connection parameters.
Not sure why we should be trying to do it like that at
all; it'd be better if the original command-line parameters
got passed down in all cases. Looking at that now.
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