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 1u0tww-00A87c-Hy for pgsql-hackers@arkaria.postgresql.org; Sat, 05 Apr 2025 03:12: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 1u0twt-008A9w-Ah for pgsql-hackers@arkaria.postgresql.org; Sat, 05 Apr 2025 03:11:59 +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 1u0twt-008A6J-0I for pgsql-hackers@lists.postgresql.org; Sat, 05 Apr 2025 03:11:59 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u0two-00325U-38 for pgsql-hackers@postgresql.org; Sat, 05 Apr 2025 03:11:56 +0000 Received: from [172.20.10.2] (sp49-97-70-90.msc.spmode.ne.jp [49.97.70.90]) by oss.nttdata.com (Postfix) with ESMTPSA id 46C3861288; Sat, 5 Apr 2025 12:11:49 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: Date: Sat, 5 Apr 2025 12:11:48 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Use XLOG_CONTROL_FILE macro everywhere? To: "Anton A. Melnikov" , Kyotaro Horiguchi Cc: daniel@yesql.se, peter@eisentraut.org, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, michael@paquier.xyz, pgsql-hackers@postgresql.org References: <54B16BF2-6979-4BB0-BE39-118D32B1BC58@yesql.se> <20240903.143756.562059416508617821.horikyota.ntt@gmail.com> <20240904.170927.1051663922860738119.horikyota.ntt@gmail.com> <359568e0-cffc-4f64-b84c-eee76ba229b8@postgrespro.ru> <2883bd25-f362-41ed-8d41-b6e0aac8fa27@postgrespro.ru> <18d80eb9-1e7a-4ead-98fe-60efc988954b@oss.nttdata.com> Content-Language: en-US From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025/04/05 8:27, Anton A. Melnikov wrote: > Hi! > > On 04.04.2025 19:32, Fujii Masao wrote: >> I'm not sure there's clear consensus yet on the changes in the 0001 and >> 0002 patches, and it might not be worth rushing them in right before >> the feature freeze. So for now, I reviewed and updated only the 0003 patch, >> since there seems to be agreement on that one. >> >> I've attached the updated version. It fixes a typo and replaces >> the remaining hardcoded control file name with the XLOG_CONTROL_FILE macro. > > Thanks! Looks good for me. Thanks for checking! Barring any objections, I'll go ahead and commit the patch. > Maybe extend this to perl tests since there are several hardcoded names too? > The patch attached tries to do this. I had the same thought, i.e., we could use scan_server_header() to pull XLOG_CONTROL_FILE from xlog_internal.h and replace the hardcoded "global/pg_control" in the TAP tests. But for now, that feels like overkill, since the TAP tests already have other hardcoded values like the WAL directory (pg_wal), and we haven't used macros like XLOGDIR there either. Replacing just "global/pg_control" might feel inconsistent, and handling the other cases properly would take more time beyond feature freeze. So I'm thinking it's better to use XLOG_CONTROL_FILE only in C code for now. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION