Re: Use XLOG_CONTROL_FILE macro everywhere?

From: "Anton A(dot) Melnikov" <a(dot)melnikov(at)postgrespro(dot)ru>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: daniel(at)yesql(dot)se, peter(at)eisentraut(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us, robertmhaas(at)gmail(dot)com, michael(at)paquier(dot)xyz, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Use XLOG_CONTROL_FILE macro everywhere?
Date: 2025-04-05 19:10:02
Message-ID: 4419f57e-8af5-425a-aa98-a2f921162d37@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

On 05.04.2025 06:11, Fujii Masao wrote:
>
> Thanks for checking! Barring any objections, I'll go ahead and commit the patch.
>

As for me all is ok. Thanks!

>> 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.

Agreed. Also think that it is better to fix all such places at once and some later.

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 Noah Misch 2025-04-05 19:13:39 Re: Back-patch of: avoid multiple hard links to same WAL file after a crash
Previous Message Srirama Kucherlapati 2025-04-05 18:29:50 RE: AIX support