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 1nC5J1-0004yJ-T9 for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jan 2022 19:47: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 1nC5J0-0003vR-Nk for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jan 2022 19:47: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 1nC5GR-00082w-H5 for pgsql-hackers@lists.postgresql.org; Mon, 24 Jan 2022 19:44:31 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nC5GP-0003lQ-7I for pgsql-hackers@lists.postgresql.org; Mon, 24 Jan 2022 19:44:31 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1nC5GH-00Ap4A-Li; Mon, 24 Jan 2022 14:44:21 -0500 Date: Mon, 24 Jan 2022 14:44:21 -0500 From: Bruce Momjian To: Justin Pryzby Cc: Michael Paquier , Peter Eisentraut , Tom Lane , Daniel Gustafsson , Andrew Dunstan , pgsql-hackers@lists.postgresql.org Subject: Re: pg_upgrade should truncate/remove its logs before running Message-ID: References: <20220111200307.GA14051@telsasoft.com> <20220112040813.GD14051@telsasoft.com> <45e7680a-b617-1397-afa0-35a793aacefe@enterprisedb.com> <20220124174117.GW23027@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220124174117.GW23027@telsasoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jan 24, 2022 at 11:41:17AM -0600, Justin Pryzby wrote: > On Mon, Jan 24, 2022 at 12:39:30PM -0500, Bruce Momjian wrote: > > On Mon, Jan 24, 2022 at 10:59:40AM +0900, Michael Paquier wrote: > > > On Thu, Jan 20, 2022 at 07:51:37PM +0900, Michael Paquier wrote: > > > > Neat idea. That would work fine for my case. So I am fine to stick > > > > with this suggestion. > > > > > > I have been looking at this idea, and the result is quite nice, being > > > simpler than anything that has been proposed on this thread yet. We > > > get a simpler removal logic, and there is no need to perform any kind > > > of sanity checks with the output path provided as long as we generate > > > the paths and the dirs after adjust_data_dir(). > > ... > > > > > > > > > pg_upgrade creates various working files, such > > > - as schema dumps, in the current working directory. For security, be sure > > > - that that directory is not readable or writable by any other users. > > > + as schema dumps, stored within pg_upgrade_output.d in > > > + the directory of the new cluster. > > > > > > > Uh, how are we instructing people to delete that pg_upgrade output > > directory? If pg_upgrade completes cleanly, would it be removed > > automatically? > > Clearly. OK, thanks. There are really two cleanups --- first, the "log" directory, and second deletion of the old cluster by running delete_old_cluster.sh. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.