Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLVGJ-0001MA-JZ for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Sep 2020 17:42:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kLVGI-0002Ii-84 for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Sep 2020 17:42:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLVGI-0002Ia-24 for pgsql-bugs@lists.postgresql.org; Thu, 24 Sep 2020 17:42:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLVGF-00082E-WD for pgsql-bugs@lists.postgresql.org; Thu, 24 Sep 2020 17:42:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 08OHgPPT1664517; Thu, 24 Sep 2020 13:42:25 -0400 From: Tom Lane To: Zsolt Ero cc: Magnus Hagander , PostgreSQL mailing lists , Daniel Gustafsson Subject: Re: BUG #16604: pg_dump with --jobs breaks SSL connections In-reply-to: <1663666.1600968283@sss.pgh.pa.us> References: <16604-933f4b8791227b15@postgresql.org> <61B1FFD2-EA7B-4C62-92A1-44C5459189C0@yesql.se> <1638874.1600963896@sss.pgh.pa.us> <1663666.1600968283@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 24 Sep 2020 13:24:43 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1664515.1600969345.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 24 Sep 2020 13:42:25 -0400 Message-ID: <1664516.1600969345@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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=3D"hostaddr=3D127.0.0.1 sslmode=3Dverify-ca dbname=3D= postgres user=3Dpostgres sslcert=3Dclient-cert.crt sslkey=3Dclient-cert.ke= y" -Fd dumpdir pg_restore: error: could not reconnect to database: FATAL: connection req= uires 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