Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qiw6g-008VOd-OZ for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Sep 2023 12:15:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qiw6f-00HD4I-FE for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Sep 2023 12:15:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qiw6f-00HD3f-4L for pgsql-hackers@lists.postgresql.org; Wed, 20 Sep 2023 12:15:01 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qiw6c-005cb4-6J for pgsql-hackers@lists.postgresql.org; Wed, 20 Sep 2023 12:14:59 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 02D902FAE7E0 for ; Wed, 20 Sep 2023 14:14:56 +0200 (CEST) Received: from s934.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id E68DE2E28B21; Wed, 20 Sep 2023 14:14:55 +0200 (CEST) Received: from s474.loopia.se (unknown [172.22.191.5]) by s934.loopia.se (Postfix) with ESMTP id DE32D7CEA77; Wed, 20 Sep 2023 14:14:55 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.01 X-Spam-Level: X-Spam-Status: No, score=-1.01 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=disabled Received: from s979.loopia.se ([172.22.191.5]) by s474.loopia.se (s474.loopia.se [172.22.190.14]) (amavisd-new, port 10024) with UTF8LMTP id 2AJUuCar869T; Wed, 20 Sep 2023 14:14:55 +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 s979.loopia.se (Postfix) with ESMTPSA id 654E810BC487; Wed, 20 Sep 2023 14:14:55 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) Subject: Re: Improve the log message output of basic_archive when basic_archive.archive_directory parameter is not set From: Daniel Gustafsson In-Reply-To: <85b9e69997bbd5d8302a3a99a2de246d@oss.nttdata.com> Date: Wed, 20 Sep 2023 14:14:54 +0200 Cc: Nathan Bossart , Alvaro Herrera , pgsql-hackers@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202309151049.dmfsxc5b3wyf@alvherre.pgsql> <7035FAFE-7E91-4B31-AA72-75EE82DB3F7B@yesql.se> <20230915143827.GA1912920@nathanxps13> <85b9e69997bbd5d8302a3a99a2de246d@oss.nttdata.com> To: bt23nguyent X-Mailer: Apple Mail (2.3696.120.41.1.3) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 19 Sep 2023, at 11:21, bt23nguyent = wrote: > Please let me know if you have any further suggestions that I can = improve more. + *logdetail =3D pstrdup("WAL archiving failed because = basic_archive.archive_directory is not set"); Nitpick: detail messages should end with a period per the error message = style guide [0]. - archiving will proceed only when it returns = true. + archiving will proceed only when it returns = true. The + archiver may also emit the detail explaining how the module is not = configured + to the sever log if the archive module has any.=20 I think this paragraph needs to be updated to include how the returned logdetail is emitted, since it currently shows the WARNING without = mentioning the added detail in case returned. It would also be good to mention = that it should be an allocated string which the caller can free. -- Daniel Gustafsson [0] https://www.postgresql.org/docs/devel/error-style-guide.html=