Re: Use XLOG_CONTROL_FILE macro everywhere?

From: "Anton A(dot) Melnikov" <a(dot)melnikov(at)postgrespro(dot)ru>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use XLOG_CONTROL_FILE macro everywhere?
Date: 2024-04-24 09:32:46
Message-ID: 6457915f-f880-452d-a4ae-21a5bfbccbd3@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 24.04.2024 12:19, Daniel Gustafsson wrote:
>> On 24 Apr 2024, at 11:13, Anton A. Melnikov <a(dot)melnikov(at)postgrespro(dot)ru> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2024-04-24 09:46:40 Re: Q: Escapes in jsonpath Idents
Previous Message Daniel Gustafsson 2024-04-24 09:19:59 Re: Use XLOG_CONTROL_FILE macro everywhere?