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:24:43
Message-ID: 1663666.1600968283@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> 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. ...
> 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.

The attached patch seems to fix it, and also takes care of a nasty
habit that parallel pg_restore had of issuing repeated password
prompts if you're fool enough to specify -W. IMO it's only
sensible to apply that option on the first connection attempt.

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.

regards, tom lane

Attachment Content-Type Size
fix-parallel-pg-dump-with-dbname-connstring.patch text/x-diff 4.2 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-09-24 17:42:25 Re: BUG #16604: pg_dump with --jobs breaks SSL connections
Previous Message Tom Lane 2020-09-24 16:11:36 Re: BUG #16604: pg_dump with --jobs breaks SSL connections