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 1nAObf-0005QU-Kn for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Jan 2022 03:59:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nAObe-0007IK-7a for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Jan 2022 03:59:26 +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 1nAObd-0007IB-Rb for pgsql-hackers@lists.postgresql.org; Thu, 20 Jan 2022 03:59:25 +0000 Received: from mail-il1-x12e.google.com ([2607:f8b0:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nAObW-0008KS-Bi for pgsql-hackers@lists.postgresql.org; Thu, 20 Jan 2022 03:59:25 +0000 Received: by mail-il1-x12e.google.com with SMTP id o10so4062333ilh.0 for ; Wed, 19 Jan 2022 19:59:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=EXLcvWKmk4ZW02XwHOEBviekZpR3Pyhq4GujOxkZtH4=; b=Sqc4XgjX0+rYRhXo8r6UeX2JnIPs8APNadkJ9obO5tSKscpWwgHGMaXtQx4jfNkVgM anJEUWZtQfaOJedI9Gb9LcIBZz1cGOM972FlhKDNPNVmHMkXkellvc3078uH8MlzFJfw AZiQX4sWB3jK/RNMn5b5HjJQ7/kusMUigfo28Vt5psK8OudnRLgCd9iloqmX+r0oqz7W KUYFD5mkf6GoAIqv6HeZf1ddJs3HaBLjwypw9rE1VE3htTaSVpLfDVCd3lKHL4s14dOC S7qBWIjl/KxOg4nZX+kSm+LX8MeY61mvDqug38mGX3sbuj3v+wMHs9+cKW2/I7jswRXQ /JzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=EXLcvWKmk4ZW02XwHOEBviekZpR3Pyhq4GujOxkZtH4=; b=IRSa6nCplYoZtbXW4Yg+IlJtDJvlNRMzEyrRXzM/g/bZWeFEqrFLqACzn3JFM41A1H hnwtje30gjGmOaDmcwMOPxLRp1cn8Rvt1S9wrXdfGgmJCvz+E0SCI3G4cIcfFz15z/60 QXFG7VgeYvIbGoO+tZSGVanZNCIAruBrvzpMhY3GPkelBUJv3tW/OzT5BL8/lawjI/5p oPT75fu2LZWGNX6azUexR3i6nlrxg/LcjLnSkcJ0dd7mpf96a3EwVWftJ79JJfuBwWz3 ds1CKEXlOqU5j4bWuzFqlwCjucVT2atY6DFlpGI2Ge/lJmLn6lEcl+ycIY6BEaDiZ3Vq MvGQ== X-Gm-Message-State: AOAM533+Be2t32ltDHeOyK6oulOJCAA7Onpx6cz8Mj9PDRYSDSVAEvqX l7NyYqmqwRHwV6D41W0tXsspOw== X-Google-Smtp-Source: ABdhPJymxKBj3xCQDpBJXzioAxrGVZwDDWP2tIKnPU/03bLJ3YCfVpHBb/F/EXi6sIz912YAJQE4gw== X-Received: by 2002:a05:6e02:20cc:: with SMTP id 12mr10008962ilq.163.1642651155688; Wed, 19 Jan 2022 19:59:15 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id y142sm893393iof.17.2022.01.19.19.59.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jan 2022 19:59:15 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 9EEE0801BD4; Wed, 19 Jan 2022 21:59:14 -0600 (CST) Date: Wed, 19 Jan 2022 21:59:14 -0600 From: Justin Pryzby To: Michael Paquier Cc: Tom Lane , Daniel Gustafsson , Peter Eisentraut , Andrew Dunstan , Bruce Momjian , pgsql-hackers@lists.postgresql.org Subject: Re: pg_upgrade should truncate/remove its logs before running Message-ID: <20220120035914.GH23027@telsasoft.com> References: <238201.1640184746@sss.pgh.pa.us> <20211222163611.GC17618@telsasoft.com> <20220108184857.GI14051@telsasoft.com> <20220111200307.GA14051@telsasoft.com> <20220112040813.GD14051@telsasoft.com> <20220120000540.GG23027@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jan 20, 2022 at 12:01:29PM +0900, Michael Paquier wrote: > On Wed, Jan 19, 2022 at 06:05:40PM -0600, Justin Pryzby wrote: > > > I'm not sure these restrictions are needed ? > > This could lead to issues with rmtree() if we are not careful enough, > no? We'd had our deal of argument injections with pg_upgrade commands > in the past (fcd15f1). We require that the dir not exist, by testing if (mkdir()). So it's okay if someone specifies ../whatever or $CWD. -- Justin