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 1qh6OI-001FWt-Rt for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Sep 2023 10:49:38 +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 1qh6OH-00GK70-6W for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Sep 2023 10:49:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qh6OG-00GK6C-3e for pgsql-hackers@lists.postgresql.org; Fri, 15 Sep 2023 10:49:36 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qh6OB-005EX4-Re for pgsql-hackers@lists.postgresql.org; Fri, 15 Sep 2023 10:49:35 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DB7A35C018A; Fri, 15 Sep 2023 06:49:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 15 Sep 2023 06:49:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1694774969; x= 1694861369; bh=kB29EPyJna9UBoCOpFnR/jY4MnKSJ9NBBhaEyOkMz90=; b=C ydv2NgBPZPEAEq9F5AxbrPE3MR+mCfj3Cdq9omyHsVy1faiLggC8ruTlGjImdtm8 I3PFEckz5GQiO1tJX5Cs/cf/Ak/mOENt2WyIVLNcaV6LPeERc6oNN1hhy9qo1G6p Fbt3FO6dA9cESpWX3tr+zI/kZJIkZmsMV+HOlFF0GeoDh/ikB0s7jMGifAwH4DBy 1din2jozVy2HyJM/crqWzDv4h+7a+xlyB41lhYeS9D1T0r6bDrQDWg1fWGXWglnw vSkT0B0Lkept0PglaqRZ1w6dZS3YdarSMGgSaS2Kq0qPL4AJUjGbc1JnD4Mf7MSi g4HpRw+X8redgUCHnWzHQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudejvddgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Sep 2023 06:49:28 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 5D012A7; Fri, 15 Sep 2023 12:49:24 +0200 (CEST) Date: Fri, 15 Sep 2023 12:49:24 +0200 From: Alvaro Herrera To: Daniel Gustafsson Cc: bt23nguyent , pgsql-hackers@lists.postgresql.org Subject: Re: Improve the log message output of basic_archive when basic_archive.archive_directory parameter is not set Message-ID: <202309151049.dmfsxc5b3wyf@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3395F53B-934F-47F9-9BA9-E19AC3842937@yesql.se> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Sep-15, Daniel Gustafsson wrote: > -basic_archive_configured(ArchiveModuleState *state) > +basic_archive_configured(ArchiveModuleState *state, const char **errmsg) > > The variable name errmsg implies that it will contain the errmsg() data when it > in fact is used for errhint() data, so it should be named accordingly. > > It's probably better to define the interface as ArchiveCheckConfiguredCB > functions returning an allocated string in the passed pointer which the caller > is responsible for freeing. Also note that this callback is documented in archive-modules.sgml, so that needs to be updated as well. This also means you can't backpatch this change, or you risk breaking external software that implements this interface. I suggest that 'msg' shouldn't be a global variable. There's no need for that AFAICS; but if there is, this is a terrible name for it. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/