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 1lOmp1-0004Xz-JN for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Mar 2021 19:36:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lOmp0-0006b6-GA for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Mar 2021 19:36:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOmp0-0006az-92 for pgsql-hackers@lists.postgresql.org; Tue, 23 Mar 2021 19:36:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOmox-0000Us-S4 for pgsql-hackers@postgresql.org; Tue, 23 Mar 2021 19:36:09 +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 12NJZxlS988416; Tue, 23 Mar 2021 15:35:59 -0400 From: Tom Lane To: Jan Wieck cc: Bruce Momjian , Zhihong Yu , Andrew Dunstan , Magnus Hagander , Robins Tharakan , Peter Eisentraut , "pgsql-hackers@postgresql.org" Subject: Re: pg_upgrade failing for 200+ million Large Objects In-reply-to: <6cccaa33-c263-b8a2-b064-985605d33d25@wi3ck.info> References: <181907.1616253799@sss.pgh.pa.us> <147fa478-510b-18ef-5323-9c1725b2493c@wi3ck.info> <5bdcb010-ecdd-c69a-b441-68002fc38483@wi3ck.info> <3886649c-c77d-dfd7-08a4-d1606bc71254@wi3ck.info> <91ccdb0d-42fd-7413-4e7c-3d6445655d2e@wi3ck.info> <20210323145628.GD579@momjian.us> <8d8d3961-8e8b-3dbe-f911-6f418c5fb1d3@wi3ck.info> <20210323180646.GG579@momjian.us> <91b02dc1-f0d9-e50d-849c-18d9a66484fb@wi3ck.info> <985941.1616524546@sss.pgh.pa.us> <986904.1616525964@sss.pgh.pa.us> <6cccaa33-c263-b8a2-b064-985605d33d25@wi3ck.info> Comments: In-reply-to Jan Wieck message dated "Tue, 23 Mar 2021 15:22:04 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <988414.1616528159.1@sss.pgh.pa.us> Date: Tue, 23 Mar 2021 15:35:59 -0400 Message-ID: <988415.1616528159@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jan Wieck writes: > The problem here is that pg_upgrade itself is invoking a shell again. It > is not assembling an array of arguments to pass into exec*(). I'd be a > happy camper if it did the latter. But as things are we'd have to add > full shell escapeing for arbitrary strings. Surely we need that (and have it already) anyway? I think we've stayed away from exec* because we'd have to write an emulation for Windows. Maybe somebody will get fed up and produce such code, but it's not likely to be the least-effort route to the goal. regards, tom lane