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 1oTOuO-0007DF-31 for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Aug 2022 14:41:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oTOuL-0005qq-LF for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Aug 2022 14:41:33 +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 1oTOuL-0005nu-CH for pgsql-hackers@lists.postgresql.org; Wed, 31 Aug 2022 14:41:33 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oTOuG-0005uf-AN for pgsql-hackers@lists.postgresql.org; Wed, 31 Aug 2022 14:41:32 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 604C32F14AF5 for ; Wed, 31 Aug 2022 16:41:25 +0200 (CEST) Received: from s981.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 514523092FC3; Wed, 31 Aug 2022 16:41:25 +0200 (CEST) Received: from s472.loopia.se (unknown [172.22.191.6]) by s981.loopia.se (Postfix) with ESMTP id 4C39D22B1997; Wed, 31 Aug 2022 16:41:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s645.loopia.se ([172.22.191.6]) by s472.loopia.se (s472.loopia.se [172.22.190.12]) (amavisd-new, port 10024) with LMTP id I2p_wBjMkmaW; Wed, 31 Aug 2022 16:41:24 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from smtpclient.apple (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s645.loopia.se (Postfix) with ESMTPSA id C034D156E7B7; Wed, 31 Aug 2022 16:41:24 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: Re: pg_upgrade generated files in subdir follow-up From: Daniel Gustafsson In-Reply-To: <4061927.1661954367@sss.pgh.pa.us> Date: Wed, 31 Aug 2022 16:41:24 +0200 Cc: PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <11FF20DA-4000-4765-B034-08378243CCC1@yesql.se> References: <181A6DA8-3B7F-4B71-82D5-363FF0146820@yesql.se> <4061927.1661954367@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3696.100.31) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 31 Aug 2022, at 15:59, Tom Lane wrote: >=20 > Daniel Gustafsson writes: >> Commit 38bfae36526 moved the .txt files pg_upgrade generates to a = separate >> subdir, but there are a few left which are written to cwd. The = thread >> resulting in that patch doesn't discuss these files specifically so = it seems >> they are just an oversight. Unless I'm missing something. >=20 >> Should something the attached be applied to ensure all generated = files are >> placed in the subdirectory? >=20 > It certainly looks inconsistent ATM. I wondered if maybe the plan was = to > put routine output into the log directory but problem-reporting files > into cwd --- but that isn't what's happening now. Right, check_proper_datallowconn and = check_for_isn_and_int8_passing_mismatch and a few other check functions already place error reporting in the = subdir. > As long as we report the path to where the file is, I don't see a = reason > not to put problem-reporting files in the subdir too. Agreed. The documentation states: "pg_upgrade creates various working files, such as schema dumps, = stored within pg_upgrade_output.d in the directory of the new cluster. = Each run creates a new subdirectory named with a timestamp formatted = as per ISO 8601 (%Y%m%dT%H%M%S), where all the generated files are = stored." The delete_old_cluster and reindex_hash scripts are still placed in CWD, = which isn't changed by this patch, as that seems correct (and might break = scripts if we move them). Maybe we should amend the docs to mention that scripts = aren't generated in the subdir? -- Daniel Gustafsson https://vmware.com/