Re: BUG #16604: pg_dump with --jobs breaks SSL connections

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zsolt Ero <zsolt(dot)ero(at)gmail(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: BUG #16604: pg_dump with --jobs breaks SSL connections
Date: 2020-09-24 17:42:25
Message-ID: 1664516.1600969345@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-09-24 20:13:08 Re: BUG #16604: pg_dump with --jobs breaks SSL connections
Previous Message Tom Lane 2020-09-24 17:24:43 Re: BUG #16604: pg_dump with --jobs breaks SSL connections