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 1lOmbS-00041O-MK for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Mar 2021 19:22:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lOmbR-0001Ao-Kj for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Mar 2021 19:22:09 +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 1lOmbR-0001Ah-E4 for pgsql-hackers@lists.postgresql.org; Tue, 23 Mar 2021 19:22:09 +0000 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lOmbP-0000O7-Cw for pgsql-hackers@postgresql.org; Tue, 23 Mar 2021 19:22:09 +0000 Received: by mail-qt1-x82d.google.com with SMTP id h7so15801826qtx.3 for ; Tue, 23 Mar 2021 12:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wi3ck-info.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=26+WqdRFMW9bx+wdZLTzJrI8NCCihAY4pokRGUR2gZ0=; b=wBlGFhwiGgr3CwpQczfdOPBQTzG8uLE2HR/LybXr6jv/JE9OGg/ejNk4NA5+66He2f 6GmOepKT5Zcs9lXFum+jEjTHIIDehV+ovTVx3Q09tOLWMAwQ4Vx2FbyhNF8IsQzqJzzT nhSlNQ+lp6HanwX8YpcZ1RUy80pn0dorzKmKOshT3+vKbKSVCLTkgEnrSLcBFstr3yls imH8HiwP5sq6xfO1jL3eC9H6Q0i5vO4/u1cANzIPe6/9fA7soeI/ngMAnpjFmDPLiLpq btIM/FcZqjUBJAEh8L8C1+Ltdg3CbKedIIAqOE2o+HcF0fblEsAqlQlKJy78iulmQnWV biaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=26+WqdRFMW9bx+wdZLTzJrI8NCCihAY4pokRGUR2gZ0=; b=hlhK+YNrjTwt5vj79+sVb/DjvK/7zyk/iKJldgpyt8buVOLLOCPdYHzpd/O9K1CCYZ OSEB9Vlvd31EfKvy7QbciDilFAO6FKNHzBG0Rx1ZAmUYGh3adW35vo7aECCiIwV0Q8gI y0u5n8xg+6QJGnYTZsD8uIyNoKxn7N1CYmlplsMj1wRvCjHGyX6WcvTC4uDcT60H3ImA 1IuaGb77bF8GerC9jFV9DTW4K9bo25SAUwesMH6mTqNW+TZ3nx8+2labyTqSgM98MMYT O3dyoUzx1nwXzk99ruW7rDD7EteEKTZY1lFEDAnKTqwWLy/aBEUaD3DMSnmU+8dQWTG5 puqg== X-Gm-Message-State: AOAM532boeVvgto2rsZ+iEBjkRozwNh4hn55n5iEZ/9ae1s48GInaGw4 7cG+IKA/R1r2jqmEwuNSBvqXfp4FIDxA23l0 X-Google-Smtp-Source: ABdhPJz8/P5G7yeBxaTrFFCwkqPWJzQLmMxndBsqlEjU9nyqlCEAAbj/I5DaHasccqugDV6xM3Zauw== X-Received: by 2002:ac8:1241:: with SMTP id g1mr5780930qtj.177.1616527325275; Tue, 23 Mar 2021 12:22:05 -0700 (PDT) Received: from jupiter.onmars.janwieck.no-ip.info (pool-98-114-241-134.phlapa.fios.verizon.net. [98.114.241.134]) by smtp.gmail.com with ESMTPSA id w5sm14377445qkc.85.2021.03.23.12.22.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Mar 2021 12:22:04 -0700 (PDT) Subject: Re: pg_upgrade failing for 200+ million Large Objects To: Tom Lane Cc: Bruce Momjian , Zhihong Yu , Andrew Dunstan , Magnus Hagander , Robins Tharakan , Peter Eisentraut , "pgsql-hackers@postgresql.org" 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> From: Jan Wieck Message-ID: <6cccaa33-c263-b8a2-b064-985605d33d25@wi3ck.info> Date: Tue, 23 Mar 2021 15:22:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <986904.1616525964@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/23/21 2:59 PM, Tom Lane wrote: > Jan Wieck writes: >> On 3/23/21 2:35 PM, Tom Lane wrote: >>> If you're passing multiple options, that is >>> --pg-dump-options "--foo=x --bar=y" >>> it seems just horribly fragile. Lose the double quotes and suddenly >>> --bar is a separate option to pg_upgrade itself, not part of the argument >>> for the previous option. That's pretty easy to do when passing things >>> through shell scripts, too. > >> ... which would be all really easy if pg_upgrade wouldn't be assembling >> a shell script string to pass into parallel_exec_prog() by itself. > > No, what I was worried about is shell script(s) that invoke pg_upgrade > and have to pass down some of these options through multiple levels of > option parsing. 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. > > BTW, it doesn't seem like the "pg-" prefix has any value-add here, > so maybe "--dump-option" and "--restore-option" would be suitable > spellings. Agreed. Regards, Jan -- Jan Wieck Principle Database Engineer Amazon Web Services