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 1rzYzq-004ts5-2u for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Apr 2024 09:32:58 +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 1rzYzn-00DVdD-HR for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Apr 2024 09:32:55 +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 1rzYzn-00DVd5-2p for pgsql-hackers@lists.postgresql.org; Wed, 24 Apr 2024 09:32:55 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rzYzj-004OLt-3w for pgsql-hackers@postgresql.org; Wed, 24 Apr 2024 09:32:53 +0000 Received: from [172.30.1.222] (unknown [172.30.1.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: a.melnikov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 97F52E20E38; Wed, 24 Apr 2024 12:32:46 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1713951166; bh=v2UFHSHwHJg3NqVVRN+uhRaxgTF/U+zJyZazOWixKDg=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=CsLWMPyTZCkCntvqemAgIrcNY3eneNmnm0I9JeUqa1Ty1Bs9J2XYI9f98q6J5jNal YM4B65fUs72dGav+GJJPO9B2Y/LoVfnudmT/P8cklHwvLmRWNxcfD7kwvW1flRgW8U CCkF/VrCg8G6Y6QgkMwa32mcobcM+6AAdLB/8pRh+V/E7I1Yb93Lxpg31bH4DtAZhR eEfwicASy+NUK9kIf2rEEMFKuxoFVlSYxgmlZY2i4yOIYczoSdvJETJswd4MigjmU+ TP6hCE68CdZn5UMoaL90i9kh90ACqoDIhYmTe/t0HPzZ1nrLDKu68NnaQJoPlb/C0J +T1jyRHcHINBw== Message-ID: <6457915f-f880-452d-a4ae-21a5bfbccbd3@postgrespro.ru> Date: Wed, 24 Apr 2024 12:32:46 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Use XLOG_CONTROL_FILE macro everywhere? To: Daniel Gustafsson Cc: Michael Paquier , Peter Eisentraut , PostgreSQL Hackers References: <0841ec77-47e5-452a-adb4-c6fa55d605fc@postgrespro.ru> <474746ef-fa9f-400e-902e-3bb018320ca0@eisentraut.org> <44faf5a1-1e84-4ae5-9ea7-106af77cf96b@postgrespro.ru> Content-Language: en-US From: "Anton A. Melnikov" 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 24.04.2024 12:19, Daniel Gustafsson wrote: >> On 24 Apr 2024, at 11:13, Anton A. Melnikov wrote: >> >> On 24.04.2024 12:02, Peter Eisentraut wrote: >>> On 19.04.24 05:50, Anton A. Melnikov wrote: >>>> >>>> May be better use this macro everywhere in C code? >>> I don't know. I don't find XLOG_CONTROL_FILE to be a very intuitive proxy for "pg_control". > > Maybe, but inconsistent usage is also unintuitive. > >> Then maybe replace XLOG_CONTROL_FILE with PG_CONTROL_FILE? >> >> The PG_CONTROL_FILE_SIZE macro is already in the code. >> With the best regards, > > XLOG_CONTROL_FILE is close to two decades old so there might be extensions > using it (though the risk might be slim), perhaps using offering it as as well > as backwards-compatability is warranted should we introduce a new name? > To ensure backward compatibility we can save the old macro like this: #define XLOG_CONTROL_FILE "global/pg_control" #define PG_CONTROL_FILE XLOG_CONTROL_FILE With the best wishes, -- Anton A. Melnikov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company