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 1kLTqX-0006LD-7r for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Sep 2020 16:11:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kLTqW-0001w8-4J for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Sep 2020 16:11:48 +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 1kLTqV-0001w1-Lw for pgsql-bugs@lists.postgresql.org; Thu, 24 Sep 2020 16:11:47 +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 1kLTqP-0007Ha-8S for pgsql-bugs@lists.postgresql.org; Thu, 24 Sep 2020 16:11:46 +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 08OGBawW1638875; Thu, 24 Sep 2020 12:11:37 -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: References: <16604-933f4b8791227b15@postgresql.org> <61B1FFD2-EA7B-4C62-92A1-44C5459189C0@yesql.se> Comments: In-reply-to Zsolt Ero message dated "Wed, 23 Sep 2020 15:26:34 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1638873.1600963896.1@sss.pgh.pa.us> Date: Thu, 24 Sep 2020 12:11:36 -0400 Message-ID: <1638874.1600963896@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Zsolt Ero 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